Skip to content

Commit

Permalink
Merge branch 'tribits_github_snapshot' into tribits-snapshot-2022-12-…
Browse files Browse the repository at this point in the history
…12-again

Addresses trilinos#11429
  • Loading branch information
bartlettroscoe committed Jan 11, 2023
2 parents 6858da2 + 11f73a0 commit 4dc4c6b
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 21 deletions.
17 changes: 17 additions & 0 deletions cmake/tribits/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
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
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
Expand Down
20 changes: 13 additions & 7 deletions cmake/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
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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!

Expand Down
30 changes: 20 additions & 10 deletions cmake/tribits/doc/guides/TribitsGuidesBody.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2269,6 +2269,11 @@ This defines all of the TPLs that ``<tplName>`` 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 ``<tplName>`` will not auto-enable a dependent upstream TPL
``<upstreamTpl_i>``. Likewise, disabling an upstream TPL ``<upstreamTpl_i>``
will not auto-disable a dependent downstream TPL ``<tplName>``.


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

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

17) **<Project>_ENABLE_ALL_FORWARD_DEP_PACKAGES enables downstream packages/tests**:
Setting the user cache-variable
17) **<Project>_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:

Expand Down

0 comments on commit 4dc4c6b

Please sign in to comment.