Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back deprecated <Project>_ASSERT_MISSING_PACKAGES (trilinos/Trilinos#11429) #559

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions test/core/DependencyUnitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,24 @@ create_dependency_handling_test_case(
)


create_dependency_handling_test_case(
preCopyrightTrilinos_ShowInvalidPackageNameAndTplNameError_AssertMissingPackagesOn
ARGS
-DSHOW_INVALID_PACKAGE_NAME_ERROR=ON
-DSHOW_INVALID_TPL_NAME_ERROR=ON
-DTrilinos_ASSERT_MISSING_PACKAGES=ON
PASS_REGULAR_EXPRESSION_ALL
"CMake Deprecation Warning at .*/MessageWrapper.cmake:.+ [(]message[)]:"
" Warning, Trilinos_ASSERT_MISSING_PACKAGES='ON' is set and is no longer"
" supported! Please set Trilinos_ASSERT_DEFINED_DEPENDENCIES instead [(]see"
" build ref[)]!"
"CMake Error at .*/TribitsReadDepsFilesCreateDepsGraph.cmake:.+ [(]message[)]:"
"Error, the package 'Zlib' is listed as a dependency of the package 'Zoltan'"
"ignore/disable the undefined package 'Zlib', set the cache variable"
"Trilinos_ASSERT_DEFINED_DEPENDENCIES=IGNORE[.]"
)


create_dependency_handling_test_case(
preCopyrightTrilinos_ShowInvalidPackageSelfDependency
ARGS -DTrilinos_EXTRA_REPOSITORIES=preCopyrightTrilinos
Expand Down
9 changes: 9 additions & 0 deletions tribits/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
ChangeLog for TriBITS
----------------------------------------

## 2023-01-10:

* **Added:** Added back support for deprecated variable
`<Project>_ASSERT_MISSING_PACKAGES` that was removed
[2022-10-11](#2022-10-11). When `<Project>_ASSERT_MISSING_PACKAGES` is set
to a non-null value, it overrides the default value for
`<Project>_ASSERT_DEFINED_DEPENDENCIES` (but setting
`<Project>_ASSERT_DEFINED_DEPENDENCIES` in the cache takes precedence).

## 2023-01-06:

* **Changed:** Changed all TPL dependencies back to 'Optional' so that
Expand Down
20 changes: 13 additions & 7 deletions tribits/core/package_arch/TribitsGlobalMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -720,13 +720,26 @@ macro(tribits_define_global_options_and_define_extra_repos)
"Determines if a variety of development mode checks are turned on by default or not."
)

if (NOT "${${PROJECT_NAME}_ASSERT_MISSING_PACKAGES}" STREQUAL "")
tribits_deprecated("Warning, ${PROJECT_NAME}_ASSERT_MISSING_PACKAGES="
"'${${PROJECT_NAME}_ASSERT_MISSING_PACKAGES}' is set and is no"
" longer supported! Please set"
" ${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES instead (see build ref)!" )
if (${PROJECT_NAME}_ASSERT_MISSING_PACKAGES)
set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_DEFAULT FATAL_ERROR)
else()
set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_DEFAULT IGNORE)
endif()
endif()

if ("${${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_DEFAULT}" STREQUAL "")
if (${PROJECT_NAME}_ENABLE_DEVELOPMENT_MODE)
set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_DEFAULT FATAL_ERROR)
else()
set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_DEFAULT IGNORE)
endif()
endif()

set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_ERROR_VALUES_LIST
"FATAL_ERROR" "SEND_ERROR" )
set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_VALUES_LIST
Expand All @@ -740,13 +753,6 @@ macro(tribits_define_global_options_and_define_extra_repos)
${${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_VALUES_LIST}
IS_ADVANCED )

if (NOT "${${PROJECT_NAME}_ASSERT_MISSING_PACKAGES}" STREQUAL "")
message(FATAL_ERROR "Error, ${PROJECT_NAME}_ASSERT_MISSING_PACKAGES="
" '${${PROJECT_NAME}_ASSERT_MISSING_PACKAGES}' is set and is no"
" longer supported! Please set"
" ${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES=FATAL_ERROR instead!" )
endif()

if ("${${PROJECT_NAME}_ASSERT_CORRECT_TRIBITS_USAGE_DEFAULT}" STREQUAL "")
if (${PROJECT_NAME}_ENABLE_DEVELOPMENT_MODE)
set(${PROJECT_NAME}_ASSERT_CORRECT_TRIBITS_USAGE_DEFAULT FATAL_ERROR)
Expand Down