浏览代码

CMP0064: Fix recorded version of introduction to be 3.4

This policy was added for CMake 3.4 but accidentally recorded as 3.3.
Fix this and update the RunCMake.CMP0064 test WARN case accordingly.
Brad King 10 年之前
父节点
当前提交
402bf096ec
共有 3 个文件被更改,包括 12 次插入2 次删除
  1. 1 1
      Source/cmPolicies.h
  2. 10 0
      Tests/RunCMake/CMP0064/CMP0064-WARN-stderr.txt
  3. 1 1
      Tests/RunCMake/CMP0064/CMP0064-WARN.cmake

+ 1 - 1
Source/cmPolicies.h

@@ -220,7 +220,7 @@ class cmPolicy;
     3, 3, 0, cmPolicies::WARN) \
   SELECT(POLICY, CMP0064, \
     "Support new TEST if() operator.", \
-    3, 3, 0, cmPolicies::WARN)
+    3, 4, 0, cmPolicies::WARN)
 
 #define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
 #define CM_FOR_EACH_POLICY_ID(POLICY) \

+ 10 - 0
Tests/RunCMake/CMP0064/CMP0064-WARN-stderr.txt

@@ -0,0 +1,10 @@
+CMake Warning \(dev\) at CMP0064-WARN.cmake:3 \(if\):
+  Policy CMP0064 is not set: Support new TEST if\(\) operator.  Run "cmake
+  --help-policy CMP0064" for policy details.  Use the cmake_policy command to
+  set the policy and suppress this warning.
+
+  TEST will be interpreted as an operator when the policy is set to NEW.
+  Since the policy is not set the OLD behavior will be used.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
+This warning is for project developers.  Use -Wno-dev to suppress it.

+ 1 - 1
Tests/RunCMake/CMP0064/CMP0064-WARN.cmake

@@ -1,4 +1,4 @@
-cmake_policy(SET CMP0064 OLD)
+
 
 if(TEST)
   message(FATAL_ERROR "TEST was not recognized to be undefined")