Skip to content

Commit 4dc4c6b

Browse files
Merge branch 'tribits_github_snapshot' into tribits-snapshot-2022-12-12-again
Addresses trilinos#11429
2 parents 6858da2 + 11f73a0 commit 4dc4c6b

File tree

5 files changed

+54
-21
lines changed

5 files changed

+54
-21
lines changed

cmake/tribits/CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22
ChangeLog for TriBITS
33
----------------------------------------
44

5+
## 2023-01-10:
6+
7+
* **Added:** Added back support for deprecated variable
8+
`<Project>_ASSERT_MISSING_PACKAGES` that was removed
9+
[2022-10-11](#2022-10-11). When `<Project>_ASSERT_MISSING_PACKAGES` is set
10+
to a non-null value, it overrides the default value for
11+
`<Project>_ASSERT_DEFINED_DEPENDENCIES` (but setting
12+
`<Project>_ASSERT_DEFINED_DEPENDENCIES` in the cache takes precedence).
13+
14+
## 2023-01-06:
15+
16+
* **Changed:** Changed all TPL dependencies back to 'Optional' so that
17+
disabling an external package/TPL will **not** disable any downstream
18+
external packages/TPLs that list a dependency on that external package/TPL.
19+
This undoes the change on [2022-10-20](#2022-10-20) and restores backward
20+
compatibility to the behavior before that change.
21+
522
## 2022-12-20:
623

724
* **Deprecated:** The macro `set_and_inc_dirs()` is deprecated and replaced by

cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake

+13-7
Original file line numberDiff line numberDiff line change
@@ -720,13 +720,26 @@ macro(tribits_define_global_options_and_define_extra_repos)
720720
"Determines if a variety of development mode checks are turned on by default or not."
721721
)
722722

723+
if (NOT "${${PROJECT_NAME}_ASSERT_MISSING_PACKAGES}" STREQUAL "")
724+
tribits_deprecated("Warning, ${PROJECT_NAME}_ASSERT_MISSING_PACKAGES="
725+
"'${${PROJECT_NAME}_ASSERT_MISSING_PACKAGES}' is set and is no"
726+
" longer supported! Please set"
727+
" ${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES instead (see build ref)!" )
728+
if (${PROJECT_NAME}_ASSERT_MISSING_PACKAGES)
729+
set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_DEFAULT FATAL_ERROR)
730+
else()
731+
set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_DEFAULT IGNORE)
732+
endif()
733+
endif()
734+
723735
if ("${${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_DEFAULT}" STREQUAL "")
724736
if (${PROJECT_NAME}_ENABLE_DEVELOPMENT_MODE)
725737
set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_DEFAULT FATAL_ERROR)
726738
else()
727739
set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_DEFAULT IGNORE)
728740
endif()
729741
endif()
742+
730743
set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_ERROR_VALUES_LIST
731744
"FATAL_ERROR" "SEND_ERROR" )
732745
set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_VALUES_LIST
@@ -740,13 +753,6 @@ macro(tribits_define_global_options_and_define_extra_repos)
740753
${${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_VALUES_LIST}
741754
IS_ADVANCED )
742755

743-
if (NOT "${${PROJECT_NAME}_ASSERT_MISSING_PACKAGES}" STREQUAL "")
744-
message(FATAL_ERROR "Error, ${PROJECT_NAME}_ASSERT_MISSING_PACKAGES="
745-
" '${${PROJECT_NAME}_ASSERT_MISSING_PACKAGES}' is set and is no"
746-
" longer supported! Please set"
747-
" ${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES=FATAL_ERROR instead!" )
748-
endif()
749-
750756
if ("${${PROJECT_NAME}_ASSERT_CORRECT_TRIBITS_USAGE_DEFAULT}" STREQUAL "")
751757
if (${PROJECT_NAME}_ENABLE_DEVELOPMENT_MODE)
752758
set(${PROJECT_NAME}_ASSERT_CORRECT_TRIBITS_USAGE_DEFAULT FATAL_ERROR)

cmake/tribits/core/package_arch/TribitsReadDepsFilesCreateDepsGraph.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ macro(tribits_read_external_package_deps_files_add_to_graph tplName)
223223
tribits_trace_file_processing(TPL INCLUDE "${absTplDepsFile}")
224224
include(${absTplDepsFile})
225225
foreach(depPkg IN LISTS ${tplName}_LIB_DEFINED_DEPENDENCIES)
226-
global_set(${tplName}_LIB_DEP_REQUIRED_${depPkg} TRUE)
226+
global_set(${tplName}_LIB_DEP_REQUIRED_${depPkg} FALSE)
227227
endforeach()
228228
tribits_append_forward_dep_packages(${tplName} LIB)
229229
endif()

cmake/tribits/doc/guides/ReducedMockTrilinosOutput/ExpectedDependencies.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Package dependencies information:
1717

1818
-- MPI_FORWARD_LIB_DEFINED_DEPENDENCIES: Teuchos[O] Epetra[O]
1919

20-
-- BLAS_FORWARD_LIB_DEFINED_DEPENDENCIES: LAPACK[R] Teuchos[R] Epetra[R]
20+
-- BLAS_FORWARD_LIB_DEFINED_DEPENDENCIES: LAPACK[O] Teuchos[R] Epetra[R]
2121

22-
-- LAPACK_LIB_DEFINED_DEPENDENCIES: BLAS[R]
22+
-- LAPACK_LIB_DEFINED_DEPENDENCIES: BLAS[O]
2323
-- LAPACK_FORWARD_LIB_DEFINED_DEPENDENCIES: Teuchos[R] Epetra[R]
2424

2525
-- Boost_FORWARD_LIB_DEFINED_DEPENDENCIES: Teuchos[O]
@@ -68,7 +68,7 @@ Dumping direct enabled dependencies for each package ...
6868

6969
-- BLAS: No enabled dependencies!
7070

71-
-- LAPACK_LIB_ENABLED_DEPENDENCIES: BLAS[R]
71+
-- LAPACK_LIB_ENABLED_DEPENDENCIES: BLAS[O]
7272

7373
-- Boost: No enabled dependencies!
7474

cmake/tribits/doc/guides/TribitsGuidesBody.rst

+20-10
Original file line numberDiff line numberDiff line change
@@ -2269,6 +2269,11 @@ This defines all of the TPLs that ``<tplName>`` could directly depends on but
22692269
only dependencies for enabled upstream TPLs will be added to the IMPORTED
22702270
targets.
22712271

2272+
NOTE: TPL-to-TPL dependencies are optional. Therefore, in the above example,
2273+
enabling the TPL ``<tplName>`` will not auto-enable a dependent upstream TPL
2274+
``<upstreamTpl_i>``. Likewise, disabling an upstream TPL ``<upstreamTpl_i>``
2275+
will not auto-disable a dependent downstream TPL ``<tplName>``.
2276+
22722277

22732278
TriBITS External Package/TPL Core Variables
22742279
...........................................
@@ -3676,19 +3681,24 @@ In more detail, these rules/behaviors are:
36763681

36773682
.. _<Project>_ENABLE_ALL_FORWARD_DEP_PACKAGES enables downstream packages/tests:
36783683

3679-
17) **<Project>_ENABLE_ALL_FORWARD_DEP_PACKAGES enables downstream packages/tests**:
3680-
Setting the user cache-variable
3684+
17) **<Project>_ENABLE_ALL_FORWARD_DEP_PACKAGES enables downstream
3685+
packages/tests**: Setting the user cache-variable
36813686
``${PROJECT_NAME}_ENABLE_ALL_FORWARD_PACKAGES=ON`` will result in the
3682-
`downstream`_ ``PT`` packages and tests to be enabled (and all ``PT``
3683-
and ``ST`` packages and tests when
3687+
`downstream`_ ``PT`` internal packages and tests to be enabled (and all
3688+
``PT`` and ``ST`` packages and tests when
36843689
``${PROJECT_NAME}_SECONDARY_TESTED_CODE=ON``) for all explicitly enabled
3685-
packages. For example, configuring with ``Trilinos_ENABLE_Epetra=ON``,
3686-
``Trilinos_ENABLE_TESTS=ON``, and
3690+
internal packages. For example, in the mock Trilinos project, configuring
3691+
with ``Trilinos_ENABLE_Epetra=ON``, ``Trilinos_ENABLE_TESTS=ON``, and
36873692
``Trilinos_ENABLE_ALL_FORWARD_PACKAGES=ON`` will result the package
3688-
enables (and test and example enables) for the packages ``Triutils``,
3689-
``EpetraExt``, ``ThyraCoreLibs``, ``ThyraEpetra`` and ``Thyra``. For an
3690-
example, see `Explicit enable of a package and downstream packages and
3691-
tests`_.
3693+
enables (and test and example enables) for the downstream packages
3694+
``Triutils``, ``EpetraExt``, ``ThyraCoreLibs``, ``ThyraEpetra`` and
3695+
``Thyra``. For an example, see `Explicit enable of a package and
3696+
downstream packages and tests`_. Note that when setting this option, the
3697+
enable of an external package/TPL will **not** result in the auto-enable
3698+
of downstream internal packages. For example, setting
3699+
``Trilinos_ENABLE_BLAS=ON`` will not result in the auto-enable of any
3700+
internal packages that depend on ``BLAS`` like ``Teuchos`` (in the mock
3701+
Trilinos project).
36923702

36933703
.. _${PROJECT_NAME}_ENABLE_ALL_PACKAGES:
36943704

0 commit comments

Comments
 (0)