From 11f73a00f1cb98a8ea01c71b6ac37c270425d3d4 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Wed, 11 Jan 2023 10:23:59 -0700 Subject: [PATCH] Automatic snapshot commit from tribits at bf7c58f6 Origin repo remote tracking branch: 'github/master' Origin repo remote repo URL: 'github = git@github.com:TriBITSPub/TriBITS.git' Git describe: vera-release-3.5-start-1697-gd0ae49f2 At commit: commit bf7c58f60f8da7da81972e93bf7e67b3e821c6e2 Author: Roscoe A. Bartlett Date: Tue Jan 10 16:15:09 2023 -0700 Summary: Bring back deprecated _ASSERT_MISSING_PACKAGES (trilinos/Trilinos#11429) --- cmake/tribits/CHANGELOG.md | 17 +++++++++++ .../package_arch/TribitsGlobalMacros.cmake | 20 ++++++++----- .../TribitsReadDepsFilesCreateDepsGraph.cmake | 2 +- .../ExpectedDependencies.txt | 6 ++-- .../tribits/doc/guides/TribitsGuidesBody.rst | 30 ++++++++++++------- 5 files changed, 54 insertions(+), 21 deletions(-) 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: