Silence deprecation warnings from CMake 3.0+
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 24 Jul 2014 21:08:29 +0000 (23:08 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 24 Jul 2014 21:11:01 +0000 (23:11 +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.1 currently.

So we explicitly tell CMake to use OLD behavior for CMP0043. And for CMP0026,
which is related to our handling of genversion (no need to fix this properly,
as genversion is gone in Quassel 0.11 anyway). And while we're at it, we
remove setting CMP0003 to NEW, this hasn't been needed in a very
long time...

CMakeLists.txt

index 42bacd8..0ed071a 100644 (file)
@@ -35,7 +35,8 @@ include(CheckCXXCompilerFlag)
 cmake_minimum_required(VERSION 2.8.1 FATAL_ERROR)
 
 if(COMMAND cmake_policy)
-   cmake_policy(SET CMP0003 NEW)
+   cmake_policy(SET CMP0026 OLD)
+   cmake_policy(SET CMP0043 OLD)
 endif(COMMAND cmake_policy)
 
 # Use our own (well, and KDE's) version of some modules