diff options
author | Jörg Mayer <jmayer@loplof.de> | 2013-11-09 09:36:09 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2013-11-09 09:36:09 +0000 |
commit | f9b68b05e449b49ce80cb82e022c0ce6e6a64588 (patch) | |
tree | 43067b5d5590d97a79b7143f24f911ff74b9d447 /CMakeLists.txt | |
parent | 0e61383d0757e4f54978015c19725fabbe3ac9d6 (diff) |
No need to check whether cmake_policy command exists as we require
cmake 2.6.
Add two more policy statements to avoid warnings on current cmake systems.
CMP0020 doesn't work - no idea why.
svn path=/trunk/; revision=53180
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index feca771bc3..afbcbf2efd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,11 +27,20 @@ cmake_minimum_required(VERSION 2.6) set(CMAKE_BACKWARDS_COMPATIBILITY 2.6) # Needs to be set after cmake_minimum_required or cmake_policy(VERSION) -if(COMMAND cmake_policy) - # Backward compatibility for versions < 2.6.3 - cmake_policy(SET CMP0011 OLD) -# cmake_policy(SET CMP0015 NEW) -endif(COMMAND cmake_policy) +# Policy since 2.6.1 +cmake_policy(SET CMP0008 NEW) +# Policy since 2.6.3 +# Backward compatibility for versions < 2.6.3 +cmake_policy(SET CMP0011 OLD) +# Policy since 2.8.1 +#cmake_policy(SET CMP0015 NEW) +# Policy since 2.8.11 +if( ${CMAKE_MAJOR_VERSION} GREATER 2 OR + ${CMAKE_MINOR_VERSION} GREATER 8 OR + (${CMAKE_MINOR_VERSION} EQUAL 8 AND ${CMAKE_PATCH_VERSION} GREATER 10) ) + # Don't: Automatically link Qt executable to qtmain target on Windows + cmake_policy(SET CMP0020 OLD) +endif() # This cannot be implemented via option(...) if( NOT CMAKE_BUILD_TYPE ) |