Silence deprecation warning from CMake 3.0+
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 24 Jul 2014 21:02:45 +0000 (23:02 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 24 Jul 2014 21:02:45 +0000 (23:02 +0200)
Setting COMPILE_DEFINITIONS_<Config> has been deprecated since CMake 3.0.
However, the "proper" way of doing things now (generator expressions) have
been support only since CMake 2.8.10, and we require 2.8.9 currently.

Thus, we explicitly enable OLD behavior for CMP0043.

CMakeLists.txt

index a9a32ac..0c1141f 100644 (file)
@@ -34,6 +34,10 @@ include(FeatureSummary)
 include(QuasselCompileSettings)
 include(QuasselMacros)
 
 include(QuasselCompileSettings)
 include(QuasselMacros)
 
+# 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.
+cmake_policy(SET CMP0043 OLD)
+
 
 # Options and variables that can be set on the command line
 #####################################################################
 
 # Options and variables that can be set on the command line
 #####################################################################