Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tribits/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
ChangeLog for TriBITS
----------------------------------------

## 2025-03-22:

* **Changed:** Set CMake policy
[CMP0144](https://cmake.org/cmake/help/latest/policy/CMP0144.html) to `NEW`
(for versions of CMake 3.27+) so that `find_package(<PackageName> ...)` will
use upper case env var `<PACKAGENAME>_ROOT`. Now, systems that are setting
uppercase env var names for standard packages will get picked in CMake
configures.

## 2025-02-17:

* **Added:** Added support for header-only libraries with
Expand Down
20 changes: 13 additions & 7 deletions tribits/core/common/TribitsCMakePolicies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@
# *****************************************************************************
# @HEADER

macro(tribits_set_cmake_policy_if_exists policyName oldOrNew)
if (POLICY ${policyName})
cmake_policy(SET ${policyName} ${oldOrNew})
endif()
endmacro()

# Define policies for CMake
# It is assumed that the project has already called CMAKE_MINIMUM_REQUIRED.
cmake_policy(SET CMP0003 NEW) # Don't split up full lib paths to linker args
cmake_policy(SET CMP0007 NEW) # Don't ignore empty list items
cmake_policy(SET CMP0053 NEW) # Make var references much faster
cmake_policy(SET CMP0054 NEW) # Avoid quoted strings lookup variables
cmake_policy(SET CMP0057 NEW) # Support if ( ... IN_LIST ... )
cmake_policy(SET CMP0082 NEW) # Install rules follow order install() called in subdirs
tribits_set_cmake_policy_if_exists(CMP0003 NEW) # Don't split up full lib paths to linker args
tribits_set_cmake_policy_if_exists(CMP0007 NEW) # Don't ignore empty list items
tribits_set_cmake_policy_if_exists(CMP0053 NEW) # Make var references much faster
tribits_set_cmake_policy_if_exists(CMP0054 NEW) # Avoid quoted strings lookup variables
tribits_set_cmake_policy_if_exists(CMP0057 NEW) # Support if ( ... IN_LIST ... )
tribits_set_cmake_policy_if_exists(CMP0082 NEW) # Install rules follow order install() called in subdirs
tribits_set_cmake_policy_if_exists(CMP0144 NEW) # find_package() use <PACKAGENAME>_ROOT env var