[Cmake-commits] CMake branch, next, updated. v3.3.0-rc2-433-gb8cab7a

Stephen Kelly steveire at gmail.com
Thu Jun 11 14:37:58 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  b8cab7ab603c1e7d050241424ddb8d4d693d669a (commit)
       via  40d76cb243af425872eb00beb086cf4f10b4aa92 (commit)
      from  41ec14b9b24271d79bd14e806995233d4d7ac687 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8cab7ab603c1e7d050241424ddb8d4d693d669a
commit b8cab7ab603c1e7d050241424ddb8d4d693d669a
Merge: 41ec14b 40d76cb
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Jun 11 14:37:57 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jun 11 14:37:57 2015 -0400

    Merge topic 'fail-on-ancient-policies' into next
    
    40d76cb2 Revert "cmPolicies: Unconditionally use NEW behavior for ancient policies."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=40d76cb243af425872eb00beb086cf4f10b4aa92
commit 40d76cb243af425872eb00beb086cf4f10b4aa92
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Jun 11 20:37:31 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Jun 11 20:37:31 2015 +0200

    Revert "cmPolicies: Unconditionally use NEW behavior for ancient policies."
    
    This reverts commit 00055af64dfbb8d6d797cc31d11a8152f2101eca.

diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index e5f8d0b..5026893 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -53,10 +53,6 @@ static bool stringToId(const char* input, cmPolicies::PolicyID& pid)
 #define CM_FOR_EACH_POLICY_ID_DOC(POLICY) \
   CM_FOR_EACH_POLICY_TABLE(POLICY, CM_SELECT_ID_DOC)
 
-#define CM_SELECT_ID_STATUS(F, A1, A2, A3, A4, A5, A6) F(A1, A6)
-#define CM_FOR_EACH_POLICY_ID_STATUS(POLICY) \
-  CM_FOR_EACH_POLICY_TABLE(POLICY, CM_SELECT_ID_STATUS)
-
 static const char* idToString(cmPolicies::PolicyID id)
 {
   switch(id)
@@ -323,18 +319,8 @@ std::string cmPolicies::GetRequiredPolicyError(cmPolicies::PolicyID id)
 
 ///! Get the default status for a policy
 cmPolicies::PolicyStatus
-cmPolicies::GetPolicyStatus(cmPolicies::PolicyID id)
+cmPolicies::GetPolicyStatus(cmPolicies::PolicyID)
 {
-  switch(id)
-    {
-#define POLICY_CASE(ID, STATUS) \
-    case cmPolicies::ID: \
-      return STATUS;
-  CM_FOR_EACH_POLICY_ID_STATUS(POLICY_CASE)
-#undef POLICY_CASE
-    case cmPolicies::CMPCOUNT:
-      return cmPolicies::WARN;
-    }
   return cmPolicies::WARN;
 }
 
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 85f3612..8a3c27d 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -22,40 +22,40 @@ class cmPolicy;
 #define CM_FOR_EACH_POLICY_TABLE(POLICY, SELECT) \
   SELECT(POLICY, CMP0000, \
     "A minimum required CMake version must be specified.", \
-    2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
+    2, 6, 0, cmPolicies::WARN) \
   SELECT(POLICY, CMP0001, \
     "CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.", \
-    2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
+    2, 6, 0, cmPolicies::WARN) \
   SELECT(POLICY, CMP0002, \
   "Logical target names must be globally unique.", \
-    2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
+    2, 6, 0, cmPolicies::WARN) \
   SELECT(POLICY, CMP0003, \
     "Libraries linked via full path no longer produce linker search paths.", \
-    2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
+    2, 6, 0, cmPolicies::WARN) \
   SELECT(POLICY, CMP0004, \
     "Libraries linked may not have leading or trailing whitespace.", \
-    2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
+    2, 6, 0, cmPolicies::WARN) \
   SELECT(POLICY, CMP0005, \
     "Preprocessor definition values are now escaped automatically.", \
-    2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
+    2, 6, 0, cmPolicies::WARN) \
   SELECT(POLICY, CMP0006, \
     "Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION.", \
-    2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
+    2, 6, 0, cmPolicies::WARN) \
   SELECT(POLICY, CMP0007, \
     "list command no longer ignores empty elements.", \
-    2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
+    2, 6, 0, cmPolicies::WARN) \
   SELECT(POLICY, CMP0008, \
     "Libraries linked by full-path must have a valid library file name.", \
-    2, 6, 1, cmPolicies::REQUIRED_IF_USED) \
+    2, 6, 1, cmPolicies::WARN) \
   SELECT(POLICY, CMP0009, \
     "FILE GLOB_RECURSE calls should not follow symlinks by default.", \
-    2, 6, 2, cmPolicies::REQUIRED_IF_USED) \
+    2, 6, 2, cmPolicies::WARN) \
   SELECT(POLICY, CMP0010, \
     "Bad variable reference syntax is an error.", \
-    2, 6, 3, cmPolicies::REQUIRED_IF_USED) \
+    2, 6, 3, cmPolicies::WARN) \
   SELECT(POLICY, CMP0011, \
     "Included scripts do automatic cmake_policy PUSH and POP.", \
-    2, 6, 3, cmPolicies::REQUIRED_IF_USED) \
+    2, 6, 3, cmPolicies::WARN) \
   SELECT(POLICY, CMP0012, \
     "if() recognizes numbers and boolean constants.", \
     2, 8, 0, cmPolicies::WARN) \
diff --git a/Tests/CMakeTests/ListTest.cmake.in b/Tests/CMakeTests/ListTest.cmake.in
index 99fc4d3..77c34a9 100644
--- a/Tests/CMakeTests/ListTest.cmake.in
+++ b/Tests/CMakeTests/ListTest.cmake.in
@@ -158,6 +158,8 @@ foreach(cmd Remove_Item Reverse Remove_Duplicates Sort Remove_At)
   set(${cmd}-Nonexistent-List-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?List-${cmd}-Nonexistent-List.cmake:2 \\(list\\):.*sub-command ${Cmd} requires list to be present.*")
 endforeach()
 
+set(Get-CMP0007-Warn-RESULT 0)
+set(Get-CMP0007-Warn-STDERR ".*CMake Warning \\(dev\\) at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?List-Get-CMP0007-Warn.cmake:3 \\(list\\):.*Policy CMP0007 is not set:.*")
 
 check_cmake_test(List
   No-Arguments
@@ -174,4 +176,15 @@ check_cmake_test(List
   Sort-Nonexistent-List
   Remove_At-Nonexistent-List
   Remove_At-Invalid-Index
+  Get-CMP0007-Warn
 )
+
+set(thelist "" NEW OLD)
+
+foreach (_pol ${thelist})
+    cmake_policy(SET CMP0007 ${_pol})
+    list(GET thelist 1 thevalue)
+    if (NOT thevalue STREQUAL _pol)
+        message(SEND_ERROR "returned element '${thevalue}', but expected '${_pol}'")
+    endif()
+endforeach (_pol)
diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
index c874271..c431280 100644
--- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
@@ -64,6 +64,7 @@ run_cmake(UnterminatedCall1)
 run_cmake(UnterminatedCall2)
 run_cmake(UnterminatedString)
 run_cmake(UnterminatedBrace0)
+run_cmake(UnterminatedBrace1)
 run_cmake(UnterminatedBrace2)
 run_cmake(UnterminatedBracket0)
 run_cmake(UnterminatedBracket1)
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt
new file mode 100644
index 0000000..4e3c2b5
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt
@@ -0,0 +1,13 @@
+CMake Warning \(dev\) at UnterminatedBrace1.cmake:3 \(set\):
+  Syntax error in cmake code at
+
+    .*/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake:3
+
+  when parsing string
+
+    \${
+
+  syntax error, unexpected \$end, expecting } \(2\)
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
+This warning is for project developers.  Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake
new file mode 100644
index 0000000..93fba34
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.0)
+cmake_policy(SET CMP0010 OLD)
+set(var "${")

-----------------------------------------------------------------------

Summary of changes:
 Source/cmPolicies.cxx                              |   16 +------------
 Source/cmPolicies.h                                |   24 ++++++++++----------
 Tests/CMakeTests/ListTest.cmake.in                 |   13 +++++++++++
 Tests/RunCMake/Syntax/RunCMakeTest.cmake           |    1 +
 ...e0-stderr.txt => UnterminatedBrace1-stderr.txt} |    5 ++--
 ...inatedBrace2.cmake => UnterminatedBrace1.cmake} |    1 -
 6 files changed, 30 insertions(+), 30 deletions(-)
 copy Tests/RunCMake/Syntax/{UnterminatedBrace0-stderr.txt => UnterminatedBrace1-stderr.txt} (50%)
 copy Tests/RunCMake/Syntax/{UnterminatedBrace2.cmake => UnterminatedBrace1.cmake} (72%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list