projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec04cc1
)
Simplify checking if CMake policies need to be set
author
Rolf Eike Beer
<kde@opensource.sf-tec.de>
Wed, 18 May 2016 06:54:22 +0000
(08:54 +0200)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Wed, 28 Feb 2018 22:07:09 +0000
(23:07 +0100)
Remove the magic knowledge about when a policy was introduced, simply
check if the policy exists.
Closes GH-196.
(cherry picked from commit
8714e651551428b0fed15b7a98d1be514921af7d
)
CMakeLists.txt
patch
|
blob
|
history
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
831dabf
..
03ac969
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-127,12
+127,12
@@
endif()
# Setting COMPILE_DEFINITIONS_<CONFIG> is deprecated since CMake 3.0 in favor of generator expressions.
# These have existed since CMake 2.8.10; until we depend on that, we have to explicitly enable the old policy.
-if (
CMAKE_MAJOR_VERSION GREATER 2
)
+if (
POLICY CMP0043
)
cmake_policy(SET CMP0043 OLD)
endif()
# Honor visibility settings for all target types
-if (
CMAKE_VERSION VERSION_GREATER 3.
3)
+if (
POLICY CMP006
3)
cmake_policy(SET CMP0063 NEW)
endif()