Skip to content

Commit

Permalink
Merge pull request #361 from bartlettroscoe/tribits-429-remove-deprec…
Browse files Browse the repository at this point in the history
…ated

SEACAS: Remove the usage of deprecated TriBITS macros and update TriBITS snapshot (TriBITSPub/TriBITS#429)
  • Loading branch information
gsjaardema authored Dec 22, 2022
2 parents 6a6702b + eb297b9 commit bb9ba5b
Show file tree
Hide file tree
Showing 178 changed files with 3,163 additions and 3,019 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.e
*.g.*
*.e.*
*.pyc
.libs
Makefile
Makefile.bak
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/ProjectName.cmake)

SET(Seacas_ENABLE_CXX11_DEFAULT ON)
SET(Seacas_ENABLE_Zoltan_DEFAULT ON)
SET(TRIBITS_HIDE_DEPRECATED_INCLUDE_DIRECTORIES_OVERRIDE TRUE)

# Define the TriBITS minimum required CMake version
SET(TRIBITS_CMAKE_MINIMUM_REQUIRED 3.17.0)
Expand Down
5 changes: 5 additions & 0 deletions TPLsList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,9 @@ SET( Seacas_TPLS_FINDMODS_CLASSIFICATIONS
Cereal "${PROJECT_SOURCE_DIR}/packages/seacas/cmake/tpls/" ST
ADIOS2 "${PROJECT_SOURCE_DIR}/packages/seacas/cmake/tpls/FindTPLADIOS2.cmake" EX
Catalyst2 "${PROJECT_SOURCE_DIR}/packages/seacas/cmake/tpls/FindTPLCatalyst2.cmake" EX
# TPLs defined in Zoltan/cmake/Dependencies.cmake that are never enabled
PaToH "cmake/TPLs/" EX
Scotch "cmake/TPLs/" EX
CCOLAMD "cmake/TPLs/" EX
OVIS "cmake/TPLs/" EX
)
2 changes: 2 additions & 0 deletions cmake/TPLs/FindTPLCCOLAMD.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
message(FATAL_ERROR
"Error, the TPL ${TPL_NAME} is not defined for the CMake project ${PROJECT_NAME}")
2 changes: 2 additions & 0 deletions cmake/TPLs/FindTPLOVIS.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
message(FATAL_ERROR
"Error, the TPL ${TPL_NAME} is not defined for the CMake project ${PROJECT_NAME}")
2 changes: 2 additions & 0 deletions cmake/TPLs/FindTPLPaToH.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
message(FATAL_ERROR
"Error, the TPL ${TPL_NAME} is not defined for the CMake project ${PROJECT_NAME}")
2 changes: 2 additions & 0 deletions cmake/TPLs/FindTPLScotch.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
message(FATAL_ERROR
"Error, the TPL ${TPL_NAME} is not defined for the CMake project ${PROJECT_NAME}")
77 changes: 76 additions & 1 deletion cmake/tribits/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,82 @@
ChangeLog for TriBITS
----------------------------------------

## 2022-12-20:

* **Deprecated:** The macro `set_and_inc_dirs()` is deprecated and replaced by
`tribits_set_and_inc_dirs()`. Use the script
`TriBITS/refactoring/replace_set_and_inc_dirs_r.sh` to update
`CMakeLists.txt` files.

## 2022-11-03:

* **Deprecated:** The long-deprecated TriBITS function override
`include_directories()` now emits a deprecated warning. To replace all
usages of `include_directories()` that should be
`tribits_include_directories()`, use the script
`TriBITS/refactoring/replace_include_directories_r.sh` (see documentation in
that script).

* **Deprecated:** Many previously deprecated TriBITS features now will trigger
a CMake DEPRECATION warning message by default (by calling
`message(DEPRECATION ...)`). The message printed to the CMake output will
typically describe how to remove the usage of the deprecated feature. To
remove deprecation warnings, change to use the non-deprecated features
mentioned in the deprecation warning message. To temporarily disable
deprecation warnings, configure with `-D
TRIBITS_HANDLE_TRIBITS_DEPRECATED_CODE=IGNORE` (see build reference entry
for `TRIBITS_HANDLE_TRIBITS_DEPRECATED_CODE` for more details).

## 2022-10-20:

* **Changed:** Disabling an external package/TPL will now disable any
downstream external packages/TPLs that list a dependency on that external
package/TPL through its
[`FindTPL<tplName>Dependencies.cmake`](https://tribitspub.github.io/TriBITS/users_guide/index.html#findtpl-tplname-dependencies-cmake)
file. Prior to this, disabling an external package/TPL would not disable
dependent downstream external packages/TPLs (it would only disable
downstream dependent required internal packages). To avoid this, simply
leave the enable status of the upstream external package/TPL empty "" and no
downstream propagation of disables will take place.

## 2022-10-16:

* **Removed:** Removed the variables `<Project>_LIBRARY_DIRS`,
`<Project>_TPL_LIST` and `<Project>_TPL_LIBRARIES` from the installed
`<Project>Config.cmake` file. These are not needed after the change to
modern CMake targets `<Package>::all_libs` (see `<Package>::all_libs`
below). To determine if a TPL is enabled, check `if (TARGET
<tplName>::all_libs)`. To get the libraries and include dirs for a TPL,
link against the IMPORTED target `<tplName>::all_libs` (see the updated
TriBITS example APP projects for details).

* **Removed:** Removed the variables `<Package>_PACKAGE_LIST`,
`<Package>_TPL_LIST`, `<Package>_INCLUDE_DIR`, `<Package>_LIBRARY_DIRS`,
`<Package>_TPL_INCLUDE_DIRS`, `<Package>_TPL_LIBRARIES` and
`<Package>_TPL_LIBRARY_DIRS` from the generated `<Package>Config.cmake`
files. These are not needed with the move to modern CMake targets (see
`<Package>::all_libs` below).

* **Changed:** Changed `<Package>_LIBRARIES` in generated
`<Package>Config.cmake` files from the full list of the package's library
targets to just `<Package>::all_libs`. (There is no need to list the
individual libraries after the move to modern CMake targets.)

## 2022-10-11:

* **Changed:** Added option `<Project>_ASSERT_DEFINED_DEPENDENCIES` to
determine if listed external package/TPL and internal package dependencies
are defined within the project or not. The initial default is `FATAL_ERROR`
for development mode and `IGNORE` for release mode. (Previously, undefined
external package/TPL dependencies where ignore.) To set a different
default, set `<Project>_ASSERT_DEFINED_DEPENDENCIES_DEFAULT` to `WARNING`,
for example, in the project's `ProjectName.cmake` file.

* **Removed:** `<Project>_ASSERT_MISSING_PACKAGES` has been removed and setting
it will result in a `FATAL_ERROR`. Instead, use
`<Project>_ASSERT_DEFINED_DEPENDENCIES` (and make sure all of your project's
listed TPL dependencies are all defined within the project).

## 2022-10-02:

* **Changed:** The TriBITS FindTPLCUDA.cmake module changed
Expand All @@ -11,7 +87,6 @@ ChangeLog for TriBITS
`find_package(CUDAToolkit)` (see [Trilinos
#10954](https://github.com/trilinos/Trilinos/issues/10954)).


## 2022-09-16:

* **Changed:** Changed nomenclature for packages and TPLs (see updated
Expand Down
4 changes: 2 additions & 2 deletions cmake/tribits/ci_support/TribitsDumpDepsXmlScript.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ include(TribitsWriteXmlDependenciesFiles)

# Generate the dependencies file

set(${PROJECT_NAME}_ASSERT_MISSING_PACKAGES FALSE)
set(${PROJECT_NAME}_OUTPUT_DEPENDENCY_FILES FALSE)
set(${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES OFF)
set(${PROJECT_NAME}_OUTPUT_DEPENDENCY_FILES FALSE)
if (NOT ${PROJECT_NAME}_PRE_REPOSITORIES) # Make sure is defined!
set(${PROJECT_NAME}_PRE_REPOSITORIES "")
endif()
Expand Down
Loading

0 comments on commit bb9ba5b

Please sign in to comment.