diff --git a/cmake/tribits/CHANGELOG.md b/cmake/tribits/CHANGELOG.md index c0ad93274308..a03ba918a475 100644 --- a/cmake/tribits/CHANGELOG.md +++ b/cmake/tribits/CHANGELOG.md @@ -2,6 +2,23 @@ ChangeLog for TriBITS ---------------------------------------- +## 2023-01-10: + +* **Added:** Added back support for deprecated variable + `_ASSERT_MISSING_PACKAGES` that was removed + [2022-10-11](#2022-10-11). When `_ASSERT_MISSING_PACKAGES` is set + to a non-null value, it overrides the default value for + `_ASSERT_DEFINED_DEPENDENCIES` (but setting + `_ASSERT_DEFINED_DEPENDENCIES` in the cache takes precedence). + +## 2023-01-06: + +* **Changed:** Changed all TPL dependencies back to 'Optional' so that + disabling an external package/TPL will **not** disable any downstream + external packages/TPLs that list a dependency on that external package/TPL. + This undoes the change on [2022-10-20](#2022-10-20) and restores backward + compatibility to the behavior before that change. + ## 2022-12-20: * **Deprecated:** The macro `set_and_inc_dirs()` is deprecated and replaced by diff --git a/cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake b/cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake index 7f452f338b7a..63e0930da23a 100644 --- a/cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake +++ b/cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake @@ -720,6 +720,18 @@ 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) @@ -727,6 +739,7 @@ macro(tribits_define_global_options_and_define_extra_repos) 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 @@ -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) diff --git a/cmake/tribits/core/package_arch/TribitsReadDepsFilesCreateDepsGraph.cmake b/cmake/tribits/core/package_arch/TribitsReadDepsFilesCreateDepsGraph.cmake index 9ec045e0099b..bd5f09e61d37 100644 --- a/cmake/tribits/core/package_arch/TribitsReadDepsFilesCreateDepsGraph.cmake +++ b/cmake/tribits/core/package_arch/TribitsReadDepsFilesCreateDepsGraph.cmake @@ -223,7 +223,7 @@ macro(tribits_read_external_package_deps_files_add_to_graph tplName) tribits_trace_file_processing(TPL INCLUDE "${absTplDepsFile}") include(${absTplDepsFile}) foreach(depPkg IN LISTS ${tplName}_LIB_DEFINED_DEPENDENCIES) - global_set(${tplName}_LIB_DEP_REQUIRED_${depPkg} TRUE) + global_set(${tplName}_LIB_DEP_REQUIRED_${depPkg} FALSE) endforeach() tribits_append_forward_dep_packages(${tplName} LIB) endif() diff --git a/cmake/tribits/doc/guides/ReducedMockTrilinosOutput/ExpectedDependencies.txt b/cmake/tribits/doc/guides/ReducedMockTrilinosOutput/ExpectedDependencies.txt index 51dbaaa44879..dccdd4e45ef7 100644 --- a/cmake/tribits/doc/guides/ReducedMockTrilinosOutput/ExpectedDependencies.txt +++ b/cmake/tribits/doc/guides/ReducedMockTrilinosOutput/ExpectedDependencies.txt @@ -17,9 +17,9 @@ Package dependencies information: -- MPI_FORWARD_LIB_DEFINED_DEPENDENCIES: Teuchos[O] Epetra[O] --- BLAS_FORWARD_LIB_DEFINED_DEPENDENCIES: LAPACK[R] Teuchos[R] Epetra[R] +-- BLAS_FORWARD_LIB_DEFINED_DEPENDENCIES: LAPACK[O] Teuchos[R] Epetra[R] --- LAPACK_LIB_DEFINED_DEPENDENCIES: BLAS[R] +-- LAPACK_LIB_DEFINED_DEPENDENCIES: BLAS[O] -- LAPACK_FORWARD_LIB_DEFINED_DEPENDENCIES: Teuchos[R] Epetra[R] -- Boost_FORWARD_LIB_DEFINED_DEPENDENCIES: Teuchos[O] @@ -68,7 +68,7 @@ Dumping direct enabled dependencies for each package ... -- BLAS: No enabled dependencies! --- LAPACK_LIB_ENABLED_DEPENDENCIES: BLAS[R] +-- LAPACK_LIB_ENABLED_DEPENDENCIES: BLAS[O] -- Boost: No enabled dependencies! diff --git a/cmake/tribits/doc/guides/TribitsGuidesBody.rst b/cmake/tribits/doc/guides/TribitsGuidesBody.rst index 876566808da4..3b790406c7bc 100644 --- a/cmake/tribits/doc/guides/TribitsGuidesBody.rst +++ b/cmake/tribits/doc/guides/TribitsGuidesBody.rst @@ -2269,6 +2269,11 @@ This defines all of the TPLs that ```` could directly depends on but only dependencies for enabled upstream TPLs will be added to the IMPORTED targets. +NOTE: TPL-to-TPL dependencies are optional. Therefore, in the above example, +enabling the TPL ```` will not auto-enable a dependent upstream TPL +````. Likewise, disabling an upstream TPL ```` +will not auto-disable a dependent downstream TPL ````. + TriBITS External Package/TPL Core Variables ........................................... @@ -3676,19 +3681,24 @@ In more detail, these rules/behaviors are: .. __ENABLE_ALL_FORWARD_DEP_PACKAGES enables downstream packages/tests: -17) **_ENABLE_ALL_FORWARD_DEP_PACKAGES enables downstream packages/tests**: - Setting the user cache-variable +17) **_ENABLE_ALL_FORWARD_DEP_PACKAGES enables downstream + packages/tests**: Setting the user cache-variable ``${PROJECT_NAME}_ENABLE_ALL_FORWARD_PACKAGES=ON`` will result in the - `downstream`_ ``PT`` packages and tests to be enabled (and all ``PT`` - and ``ST`` packages and tests when + `downstream`_ ``PT`` internal packages and tests to be enabled (and all + ``PT`` and ``ST`` packages and tests when ``${PROJECT_NAME}_SECONDARY_TESTED_CODE=ON``) for all explicitly enabled - packages. For example, configuring with ``Trilinos_ENABLE_Epetra=ON``, - ``Trilinos_ENABLE_TESTS=ON``, and + internal packages. For example, in the mock Trilinos project, configuring + with ``Trilinos_ENABLE_Epetra=ON``, ``Trilinos_ENABLE_TESTS=ON``, and ``Trilinos_ENABLE_ALL_FORWARD_PACKAGES=ON`` will result the package - enables (and test and example enables) for the packages ``Triutils``, - ``EpetraExt``, ``ThyraCoreLibs``, ``ThyraEpetra`` and ``Thyra``. For an - example, see `Explicit enable of a package and downstream packages and - tests`_. + enables (and test and example enables) for the downstream packages + ``Triutils``, ``EpetraExt``, ``ThyraCoreLibs``, ``ThyraEpetra`` and + ``Thyra``. For an example, see `Explicit enable of a package and + downstream packages and tests`_. Note that when setting this option, the + enable of an external package/TPL will **not** result in the auto-enable + of downstream internal packages. For example, setting + ``Trilinos_ENABLE_BLAS=ON`` will not result in the auto-enable of any + internal packages that depend on ``BLAS`` like ``Teuchos`` (in the mock + Trilinos project). .. _${PROJECT_NAME}_ENABLE_ALL_PACKAGES: