summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-02 14:45:54 -0400
committerBrad King <brad.king@kitware.com>2013-10-07 20:12:46 -0400
commit1763c31c3b964343b88f8f26dc2941dd8c0e1fbe (patch)
treec36ad902008dc72a82a628802595e7b6e3b391ba /CMakeLists.txt
parentaa53ee57bb50faa3aa64e86cb58bbe2df6688335 (diff)
downloadcmake-1763c31c3b964343b88f8f26dc2941dd8c0e1fbe.tar.gz
Set policy CMP0025 to NEW while building CMake itself
CMake is aware of the policy's NEW behavior and the AppleClang compiler id. Set the policy to NEW explicitly to avoid the warning and get the NEW behavior. Also teach the RunCMake test infrastructure to build tests with -DCMAKE_POLICY_DEFAULT_CMP0025=NEW to avoid the policy warning in test output that must match specific regular expressions.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1fbbe08a11..77b4604404 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,9 @@
#=============================================================================
cmake_minimum_required(VERSION 2.8.2 FATAL_ERROR)
set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
+if(POLICY CMP0025)
+ cmake_policy(SET CMP0025 NEW)
+endif()
project(CMake)
if(CMAKE_BOOTSTRAP)