-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake AnyNewerVersion
-> SameMajorVersion
#1188
Changes from all commits
d790cf0
e103ab0
52956f6
9874367
f07a54e
702140c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
cmake_minimum_required(VERSION 3.22) | ||
project(ArborX CXX) | ||
|
||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.30.0) | ||
message(STATUS "Setting policy CMP0167 to use FindBoost module") | ||
cmake_policy(SET CMP0167 OLD) | ||
cmake_policy(SET CMP0167 NEW) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't quite get that change. Please explain. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Admittedly, drive-by change. Instead of retaining old behavior, switch to the new one for finding boost modules. This allows to test both ways. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the right way to do this is unconditionally setting the policy to new. --- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(ArborX CXX)
-if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.30.0)
- message(STATUS "Setting policy CMP0167 to use FindBoost module")
- cmake_policy(SET CMP0167 OLD)
-endif()
+# FindBoost module removed in version 3.30
+cmake_policy(SET CMP0167 NEW)
# use gnu standard install directories
include(GNUInstallDirs) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you do that, you will get warnings for older versions of CMake
|
||
endif() | ||
|
||
# use gnu standard install directories | ||
|
@@ -137,7 +137,7 @@ configure_package_config_file(cmake/ArborXConfig.cmake.in | |
) | ||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/ArborXConfigVersion.cmake | ||
VERSION ${ARBORX_VERSION_STRING} | ||
COMPATIBILITY AnyNewerVersion | ||
COMPATIBILITY SameMajorVersion | ||
dalg24 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
) | ||
install(FILES | ||
${CMAKE_CURRENT_BINARY_DIR}/ArborXConfig.cmake | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Release
is the only option that worked for me here. AddingCMAKE_MSVC_RUNTIME_LIBRARY
is necessary as otherwise the release and debug versions of the libraries will conflict when building ArborX inDebug
.