-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: only set policy CMP0148 to OLD if version >= 3.27 #9126
CMake: only set policy CMP0148 to OLD if version >= 3.27 #9126
Conversation
How did my patch pass CI.. Anyway, Edit: Where is Ubuntu 20.04 CI getting CMake 3.28.1 from? It installs 3.16. |
CMakeLists.txt
Outdated
@@ -40,8 +40,9 @@ include(CheckCXXCompilerFlag) | |||
include(CheckLinkerFlag) | |||
include(CheckLibraryExists) | |||
include(CheckFunctionExists) | |||
|
|||
cmake_policy(SET CMP0148 OLD) | |||
if (NOT("${CMAKE_VERSION}" VERSION_LESS 3.27)) # If CMake version >= 3.27 |
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.
if(POLICY CMP0148)
cmake_policy(SET CMP0148 OLD) # https://cmake.org/cmake/help/latest/policy/CMP0148.html
endif()
It is a cleaner syntax IMHO [1].
The build shows that CMake is 3.27.8. https://github.com/monero-project/monero/actions/runs/6991078601/job/19021248770#step:9:25 This is a question for me too, where does our CI get 3.27.8. |
@0xFFFC0000 CI VM has it pre-installed, see #9128 |
Thanks. Now it makes sense. |
694105e
to
7e442c2
Compare
Co-authored-by: 0xFFFC0000 <[email protected]>
7e442c2
to
e7629dc
Compare
Allows people to compile if their CMake is older than 3.27
@tobtoht