[Cmake-commits] CMake branch, next, updated. v3.3.0-rc1-403-gb997ce4
Stephen Kelly
steveire at gmail.com
Tue Jun 9 18:43:40 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 b997ce4c9f57ca3b50cb93937930728b59a69f5c (commit)
via b310a8f3458a88856539d702c700532018e4f2ee (commit)
via c1f423e58a730dd9b97671f771345d1729be16ac (commit)
via 1f123a85461e1e91c361a4c6960cb8fd3cf5b8eb (commit)
via 355ad2ff51df36120b703729d75366c9459fec93 (commit)
via a3a8177eddfdfc89fae9331ca794abbc67f5d543 (commit)
from b69e00ef11fcb1f5be98c89521c5b68606dd6ccc (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=b997ce4c9f57ca3b50cb93937930728b59a69f5c
commit b997ce4c9f57ca3b50cb93937930728b59a69f5c
Merge: b69e00e b310a8f
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jun 9 18:43:39 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jun 9 18:43:39 2015 -0400
Merge topic 'fail-on-ancient-policies' into next
b310a8f3 cmPolicies: Unconditionally use NEW behavior for ancient policies.
c1f423e5 Tests: Update the minimum required cmake version.
1f123a85 Tests: Fix for NEW behavior of CMake.
355ad2ff Tests: Implement PolicyScope tests in terms of newer policies.
a3a8177e cmFileCommand: Fix implementation of CMP0009.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b310a8f3458a88856539d702c700532018e4f2ee
commit b310a8f3458a88856539d702c700532018e4f2ee
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jun 9 22:50:18 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 10 00:15:35 2015 +0200
cmPolicies: Unconditionally use NEW behavior for ancient policies.
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 5026893..e5f8d0b 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -53,6 +53,10 @@ 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)
@@ -319,8 +323,18 @@ std::string cmPolicies::GetRequiredPolicyError(cmPolicies::PolicyID id)
///! Get the default status for a policy
cmPolicies::PolicyStatus
-cmPolicies::GetPolicyStatus(cmPolicies::PolicyID)
+cmPolicies::GetPolicyStatus(cmPolicies::PolicyID id)
{
+ 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 8a3c27d..85f3612 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::WARN) \
+ 2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
SELECT(POLICY, CMP0001, \
"CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.", \
- 2, 6, 0, cmPolicies::WARN) \
+ 2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
SELECT(POLICY, CMP0002, \
"Logical target names must be globally unique.", \
- 2, 6, 0, cmPolicies::WARN) \
+ 2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
SELECT(POLICY, CMP0003, \
"Libraries linked via full path no longer produce linker search paths.", \
- 2, 6, 0, cmPolicies::WARN) \
+ 2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
SELECT(POLICY, CMP0004, \
"Libraries linked may not have leading or trailing whitespace.", \
- 2, 6, 0, cmPolicies::WARN) \
+ 2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
SELECT(POLICY, CMP0005, \
"Preprocessor definition values are now escaped automatically.", \
- 2, 6, 0, cmPolicies::WARN) \
+ 2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
SELECT(POLICY, CMP0006, \
"Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION.", \
- 2, 6, 0, cmPolicies::WARN) \
+ 2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
SELECT(POLICY, CMP0007, \
"list command no longer ignores empty elements.", \
- 2, 6, 0, cmPolicies::WARN) \
+ 2, 6, 0, cmPolicies::REQUIRED_IF_USED) \
SELECT(POLICY, CMP0008, \
"Libraries linked by full-path must have a valid library file name.", \
- 2, 6, 1, cmPolicies::WARN) \
+ 2, 6, 1, cmPolicies::REQUIRED_IF_USED) \
SELECT(POLICY, CMP0009, \
"FILE GLOB_RECURSE calls should not follow symlinks by default.", \
- 2, 6, 2, cmPolicies::WARN) \
+ 2, 6, 2, cmPolicies::REQUIRED_IF_USED) \
SELECT(POLICY, CMP0010, \
"Bad variable reference syntax is an error.", \
- 2, 6, 3, cmPolicies::WARN) \
+ 2, 6, 3, cmPolicies::REQUIRED_IF_USED) \
SELECT(POLICY, CMP0011, \
"Included scripts do automatic cmake_policy PUSH and POP.", \
- 2, 6, 3, cmPolicies::WARN) \
+ 2, 6, 3, cmPolicies::REQUIRED_IF_USED) \
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 77c34a9..99fc4d3 100644
--- a/Tests/CMakeTests/ListTest.cmake.in
+++ b/Tests/CMakeTests/ListTest.cmake.in
@@ -158,8 +158,6 @@ 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
@@ -176,15 +174,4 @@ 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 c431280..c874271 100644
--- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
@@ -64,7 +64,6 @@ 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
deleted file mode 100644
index 4e3c2b5..0000000
--- a/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-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
deleted file mode 100644
index 93fba34..0000000
--- a/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
-cmake_minimum_required(VERSION 3.0)
-cmake_policy(SET CMP0010 OLD)
-set(var "${")
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c1f423e58a730dd9b97671f771345d1729be16ac
commit c1f423e58a730dd9b97671f771345d1729be16ac
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Jun 10 00:07:39 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 10 00:15:34 2015 +0200
Tests: Update the minimum required cmake version.
diff --git a/Tests/EmptyProperty/CMakeLists.txt b/Tests/EmptyProperty/CMakeLists.txt
index 39e75f3..65aa216 100644
--- a/Tests/EmptyProperty/CMakeLists.txt
+++ b/Tests/EmptyProperty/CMakeLists.txt
@@ -1,3 +1,4 @@
+cmake_minimum_required (VERSION 3.3)
project (EmptyProperty)
set_property(DIRECTORY APPEND
diff --git a/Tests/ExternalOBJ/CMakeLists.txt b/Tests/ExternalOBJ/CMakeLists.txt
index 458c88b..64620a5 100644
--- a/Tests/ExternalOBJ/CMakeLists.txt
+++ b/Tests/ExternalOBJ/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.6)
+cmake_minimum_required (VERSION 3.3)
project (ExternalOBJ)
if(APPLE)
diff --git a/Tests/LibName/CMakeLists.txt b/Tests/LibName/CMakeLists.txt
index 3ac125f..eedd9ec 100644
--- a/Tests/LibName/CMakeLists.txt
+++ b/Tests/LibName/CMakeLists.txt
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.3)
project(LibName)
# this is a test to make sure that relative path
# LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH work
diff --git a/Tests/LinkLine/CMakeLists.txt b/Tests/LinkLine/CMakeLists.txt
index 6154dd4..d14c963 100644
--- a/Tests/LinkLine/CMakeLists.txt
+++ b/Tests/LinkLine/CMakeLists.txt
@@ -1,3 +1,4 @@
+cmake_minimum_required (VERSION 3.3)
project( LinkLine )
# Makes sure that the library order as specified by the user are
diff --git a/Tests/PreOrder/CMakeLists.txt b/Tests/PreOrder/CMakeLists.txt
index 8b4c439..a688c74 100644
--- a/Tests/PreOrder/CMakeLists.txt
+++ b/Tests/PreOrder/CMakeLists.txt
@@ -1,4 +1,5 @@
# a simple test case
+cmake_minimum_required (VERSION 3.3)
project (PreOrder)
set(CMAKE_IGNORE_DEPENDENCIES_ORDERING 1)
add_subdirectory(Library)
diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt
index faf3bc9..8caa2f0 100644
--- a/Tests/StringFileTest/CMakeLists.txt
+++ b/Tests/StringFileTest/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.6)
+cmake_minimum_required (VERSION 3.3)
project(StringFileTest)
include_directories(${StringFileTest_BINARY_DIR})
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f123a85461e1e91c361a4c6960cb8fd3cf5b8eb
commit 1f123a85461e1e91c361a4c6960cb8fd3cf5b8eb
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jun 9 23:14:25 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 10 00:15:12 2015 +0200
Tests: Fix for NEW behavior of CMake.
diff --git a/Tests/CMakeTests/FileTestScript.cmake b/Tests/CMakeTests/FileTestScript.cmake
index 9a43569..a243aa6 100644
--- a/Tests/CMakeTests/FileTestScript.cmake
+++ b/Tests/CMakeTests/FileTestScript.cmake
@@ -73,7 +73,7 @@ elseif(testname STREQUAL glob_recurse_relative_no_expression) # fail
file(GLOB_RECURSE v RELATIVE dddd)
elseif(testname STREQUAL glob_non_full_path) # pass
- file(GLOB_RECURSE v ffff*.*)
+ file(GLOB_RECURSE v FOLLOW_SYMLINKS ffff*.*)
message("v='${v}'")
elseif(testname STREQUAL make_directory_non_full_path) # pass
diff --git a/Tests/CPackComponents/CMakeLists.txt b/Tests/CPackComponents/CMakeLists.txt
index 1cb8669..c676acc 100644
--- a/Tests/CPackComponents/CMakeLists.txt
+++ b/Tests/CPackComponents/CMakeLists.txt
@@ -79,7 +79,7 @@ set(CPACK_NSIS_MENU_LINKS
)
# Suggested default root for end users of the installer:
-set(CPACK_NSIS_INSTALL_ROOT "C:\\Program Files\\CMake Tests Install Root")
+set(CPACK_NSIS_INSTALL_ROOT "C:\\\\Program Files\\\\CMake Tests Install Root")
# Include CPack to introduce the appropriate targets
include(CPack)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=355ad2ff51df36120b703729d75366c9459fec93
commit 355ad2ff51df36120b703729d75366c9459fec93
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Jun 10 00:08:51 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 10 00:09:55 2015 +0200
Tests: Implement PolicyScope tests in terms of newer policies.
Keep the spirit of the tests.
diff --git a/Tests/PolicyScope/Bar.cmake b/Tests/PolicyScope/Bar.cmake
index cf1904c..2f94d8d 100644
--- a/Tests/PolicyScope/Bar.cmake
+++ b/Tests/PolicyScope/Bar.cmake
@@ -1,8 +1,5 @@
-cmake_minimum_required(VERSION 2.6.3)
+cmake_minimum_required(VERSION 3.2)
# Make sure a policy set differently by our includer is now correct.
-cmake_policy(GET CMP0003 cmp)
-check(CMP0003 "NEW" "${cmp}")
-
-# Test allowing the top-level file to not have cmake_minimum_required.
-cmake_policy(SET CMP0000 OLD)
+cmake_policy(GET CMP0056 cmp)
+check(CMP0056 "NEW" "${cmp}")
diff --git a/Tests/PolicyScope/CMakeLists.txt b/Tests/PolicyScope/CMakeLists.txt
index 413195a..5cf302e 100644
--- a/Tests/PolicyScope/CMakeLists.txt
+++ b/Tests/PolicyScope/CMakeLists.txt
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.0)
project(PolicyScope C)
# No cmake_minimum_required(VERSION), it's in FindFoo.
@@ -12,33 +13,27 @@ endfunction()
#-----------------------------------------------------------------------------
# Test using a development framework that sets policies for us.
-# Policy CMP0011 should not be set at this point.
-cmake_policy(GET CMP0011 cmp)
-check(CMP0011 "" "${cmp}")
-
# Put the test modules in the search path.
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
# The included file should set policies for us.
-find_package(Foo)
+find_package(Foo NO_POLICY_SCOPE)
# Check policies set by the package.
-cmake_policy(GET CMP0003 cmp)
-check(CMP0003 "OLD" "${cmp}")
-cmake_policy(GET CMP0002 cmp)
-check(CMP0002 "NEW" "${cmp}")
-cmake_policy(GET CMP0011 cmp)
-check(CMP0011 "NEW" "${cmp}")
+cmake_policy(GET CMP0056 cmp)
+check(CMP0056 "OLD" "${cmp}")
+cmake_policy(GET CMP0055 cmp)
+check(CMP0055 "NEW" "${cmp}")
# Make sure an included file cannot change policies.
include(Bar)
-cmake_policy(GET CMP0003 cmp)
-check(CMP0003 "OLD" "${cmp}")
+cmake_policy(GET CMP0056 cmp)
+check(CMP0056 "OLD" "${cmp}")
# Allow the included file to change policies.
include(Bar NO_POLICY_SCOPE)
-cmake_policy(GET CMP0003 cmp)
-check(CMP0003 "NEW" "${cmp}")
+cmake_policy(GET CMP0056 cmp)
+check(CMP0056 "NEW" "${cmp}")
#-----------------------------------------------------------------------------
# Test function and macro policy recording.
@@ -46,57 +41,56 @@ check(CMP0003 "NEW" "${cmp}")
# Create the functions in an isolated scope in which we change policies.
cmake_policy(PUSH)
if(1)
- # Change CMP0002
- cmake_policy(SET CMP0002 OLD)
+ cmake_policy(SET CMP0055 OLD)
function(func1)
- # CMP0002 should be changed when this function is invoked
- cmake_policy(GET CMP0002 cmp)
- check(CMP0002 "OLD" "${cmp}")
+ # CMP0055 should be changed when this function is invoked
+ cmake_policy(GET CMP0055 cmp)
+ check(CMP0055 "OLD" "${cmp}")
endfunction()
- # Unset CMP0002
- cmake_policy(VERSION 2.4)
+ # Unset CMP0055
+ cmake_policy(VERSION 3.1)
macro(macro1)
- # CMP0002 should be unset when this macro is invoked
- cmake_policy(GET CMP0002 cmp)
- check(CMP0002 "" "${cmp}")
+ # CMP0055 should be unset when this macro is invoked
+ cmake_policy(GET CMP0055 cmp)
+ check(CMP0055 "" "${cmp}")
# Setting the policy should work here and also in the caller.
- cmake_policy(SET CMP0002 OLD)
- cmake_policy(GET CMP0002 cmp)
- check(CMP0002 "OLD" "${cmp}")
+ cmake_policy(SET CMP0055 OLD)
+ cmake_policy(GET CMP0055 cmp)
+ check(CMP0055 "OLD" "${cmp}")
endmacro()
endif()
cmake_policy(POP)
-# CMP0002 should still be NEW in this context.
-cmake_policy(GET CMP0002 cmp)
-check(CMP0002 "NEW" "${cmp}")
+# CMP0055 should still be NEW in this context.
+cmake_policy(GET CMP0055 cmp)
+check(CMP0055 "NEW" "${cmp}")
# Check the recorded policies
func1()
macro1()
-# The macro should have changed CMP0002.
-cmake_policy(GET CMP0002 cmp)
-check(CMP0002 "OLD" "${cmp}")
+# The macro should have changed CMP0055.
+cmake_policy(GET CMP0055 cmp)
+check(CMP0055 "OLD" "${cmp}")
#-----------------------------------------------------------------------------
# Test CMAKE_POLICY_DEFAULT_CMP<NNNN> variable.
cmake_policy(PUSH)
- set(CMAKE_POLICY_DEFAULT_CMP0010 OLD) # ignored
- set(CMAKE_POLICY_DEFAULT_CMP0012 OLD) # honored
- set(CMAKE_POLICY_DEFAULT_CMP0013 NEW) # honored
- set(CMAKE_POLICY_DEFAULT_CMP0014 "") # noop
- cmake_policy(VERSION 2.6.3)
- cmake_policy(GET CMP0010 cmp)
- check(CMP0010 "NEW" "${cmp}")
- cmake_policy(GET CMP0012 cmp)
- check(CMP0012 "OLD" "${cmp}")
- cmake_policy(GET CMP0013 cmp)
- check(CMP0013 "NEW" "${cmp}")
- cmake_policy(GET CMP0014 cmp)
- check(CMP0014 "" "${cmp}")
+ set(CMAKE_POLICY_DEFAULT_CMP0054 OLD) # ignored
+ set(CMAKE_POLICY_DEFAULT_CMP0055 OLD) # honored
+ set(CMAKE_POLICY_DEFAULT_CMP0056 NEW) # honored
+ set(CMAKE_POLICY_DEFAULT_CMP0057 "") # noop
+ cmake_policy(VERSION 3.2)
+ cmake_policy(GET CMP0054 cmp)
+ check(CMP0054 "NEW" "${cmp}")
+ cmake_policy(GET CMP0055 cmp)
+ check(CMP0055 "OLD" "${cmp}")
+ cmake_policy(GET CMP0056 cmp)
+ check(CMP0056 "NEW" "${cmp}")
+ cmake_policy(GET CMP0057 cmp)
+ check(CMP0057 "" "${cmp}")
cmake_policy(POP)
#-----------------------------------------------------------------------------
diff --git a/Tests/PolicyScope/FindFoo.cmake b/Tests/PolicyScope/FindFoo.cmake
index 5b441e2..3f9ac8e 100644
--- a/Tests/PolicyScope/FindFoo.cmake
+++ b/Tests/PolicyScope/FindFoo.cmake
@@ -1,2 +1,2 @@
-cmake_minimum_required(VERSION 2.6.3)
-cmake_policy(SET CMP0003 OLD)
+cmake_minimum_required(VERSION 3.2)
+cmake_policy(SET CMP0056 OLD)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3a8177eddfdfc89fae9331ca794abbc67f5d543
commit a3a8177eddfdfc89fae9331ca794abbc67f5d543
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jun 9 23:55:56 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 10 00:06:29 2015 +0200
cmFileCommand: Fix implementation of CMP0009.
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 4698468..7440357 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -906,13 +906,13 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
{
switch(status)
{
+ case cmPolicies::REQUIRED_IF_USED:
+ case cmPolicies::REQUIRED_ALWAYS:
case cmPolicies::NEW:
g.RecurseThroughSymlinksOff();
break;
case cmPolicies::OLD:
case cmPolicies::WARN:
- case cmPolicies::REQUIRED_IF_USED:
- case cmPolicies::REQUIRED_ALWAYS:
g.RecurseThroughSymlinksOn();
break;
}
@@ -1044,6 +1044,8 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
{
switch (status)
{
+ case cmPolicies::REQUIRED_IF_USED:
+ case cmPolicies::REQUIRED_ALWAYS:
case cmPolicies::NEW:
// Correct behavior, yay!
break;
@@ -1059,12 +1061,6 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
cmPolicies::GetPolicyWarning(cmPolicies::CMP0009));
}
break;
- case cmPolicies::REQUIRED_IF_USED:
- case cmPolicies::REQUIRED_ALWAYS:
- this->SetError("policy CMP0009 error");
- this->Makefile->IssueMessage(cmake::FATAL_ERROR,
- cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0009));
- return false;
}
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmFileCommand.cxx | 12 +--
Source/cmPolicies.cxx | 16 +++-
Source/cmPolicies.h | 24 +++---
Tests/CMakeTests/FileTestScript.cmake | 2 +-
Tests/CMakeTests/ListTest.cmake.in | 13 ---
Tests/CPackComponents/CMakeLists.txt | 2 +-
Tests/EmptyProperty/CMakeLists.txt | 1 +
Tests/ExternalOBJ/CMakeLists.txt | 2 +-
Tests/LibName/CMakeLists.txt | 1 +
Tests/LinkLine/CMakeLists.txt | 1 +
Tests/PolicyScope/Bar.cmake | 9 +-
Tests/PolicyScope/CMakeLists.txt | 88 +++++++++-----------
Tests/PolicyScope/FindFoo.cmake | 4 +-
Tests/PreOrder/CMakeLists.txt | 1 +
Tests/RunCMake/Syntax/RunCMakeTest.cmake | 1 -
.../RunCMake/Syntax/UnterminatedBrace1-stderr.txt | 13 ---
Tests/RunCMake/Syntax/UnterminatedBrace1.cmake | 3 -
Tests/StringFileTest/CMakeLists.txt | 2 +-
18 files changed, 85 insertions(+), 110 deletions(-)
delete mode 100644 Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt
delete mode 100644 Tests/RunCMake/Syntax/UnterminatedBrace1.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list