From: Manuel Nickschas Date: Tue, 19 Dec 2017 21:05:14 +0000 (+0100) Subject: cmake: Output build type information; add policy X-Git-Tag: 0.12.5~26 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=bf0538e811cfdd4100f7da15868e3cdc52955ae1;ds=sidebyside cmake: Output build type information; add policy CMake 3.10 added a new policy that triggers warnings when running automoc on generated files. (cherry picked from commit f6ceb85c6baa3e42dd5711fb62c96aed181ba46f) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bff2f1e..32060b96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,8 +14,9 @@ set(QUASSEL_MINOR 12) set(QUASSEL_PATCH 4) set(QUASSEL_VERSION_STRING "0.12.4") -# We want to know CMake's version for debug reasons +# Output CMake version and build type for debug reasons message(STATUS "Using CMake ${CMAKE_VERSION}") +message(STATUS "CMake build type: ${CMAKE_BUILD_TYPE}") # Tell CMake about or own modules set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) @@ -142,6 +143,11 @@ if (POLICY CMP0063) cmake_policy(SET CMP0063 NEW) endif() +# Don't automoc generated files +if (POLICY CMP0071) + cmake_policy(SET CMP0071 OLD) +endif() + # Simplify later checks #####################################################################