[Cmake-commits] CMake branch, next, updated. v3.2.2-2285-gfd3910e
Nils Gladitz
nilsgladitz at gmail.com
Wed Apr 29 11:09:54 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 fd3910e866630041d9393a2e44c02fc1ac196db1 (commit)
via 44f0992c05c6d9f08c7abe771db57d8b00175ad1 (commit)
from d5680b6aeb784ad02a529248588d85a538dd4b14 (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=fd3910e866630041d9393a2e44c02fc1ac196db1
commit fd3910e866630041d9393a2e44c02fc1ac196db1
Merge: d5680b6 44f0992
Author: Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Wed Apr 29 11:09:53 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Apr 29 11:09:53 2015 -0400
Merge topic 'if-IN_LIST' into next
44f0992c Revert "if: Implement new IN_LIST operator"
diff --cc Tests/RunCMake/CMakeLists.txt
index 22c021f,d5f1d22..dc18764
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@@ -63,9 -63,9 +63,8 @@@ add_RunCMake_test(CMP0051
add_RunCMake_test(CMP0053)
add_RunCMake_test(CMP0054)
add_RunCMake_test(CMP0055)
-add_RunCMake_test(CMP0057)
add_RunCMake_test(CMP0059)
add_RunCMake_test(CMP0060)
- add_RunCMake_test(CMP0061)
if(CMAKE_GENERATOR STREQUAL "Ninja")
add_RunCMake_test(Ninja)
endif()
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44f0992c05c6d9f08c7abe771db57d8b00175ad1
commit 44f0992c05c6d9f08c7abe771db57d8b00175ad1
Author: Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Wed Apr 29 17:09:09 2015 +0200
Commit: Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Wed Apr 29 17:09:09 2015 +0200
Revert "if: Implement new IN_LIST operator"
This reverts commit 26155d19af233e19105250fab23ee38292f5cad6.
diff --git a/Help/command/if.rst b/Help/command/if.rst
index 396becf..d50b14c 100644
--- a/Help/command/if.rst
+++ b/Help/command/if.rst
@@ -134,9 +134,6 @@ Possible expressions are:
Component-wise integer version number comparison (version format is
``major[.minor[.patch[.tweak]]]``).
-``if(<variable|string> IN_LIST <variable>)``
- True if the given element is contained in the named list variable.
-
``if(DEFINED <variable>)``
True if the given variable is defined. It does not matter if the
variable is true or false just if it has been set. (Note macro
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index e59cce7..aff696d 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -118,4 +118,3 @@ All Policies
/policy/CMP0058
/policy/CMP0059
/policy/CMP0060
- /policy/CMP0061
diff --git a/Help/policy/CMP0061.rst b/Help/policy/CMP0061.rst
deleted file mode 100644
index 066b1c9..0000000
--- a/Help/policy/CMP0061.rst
+++ /dev/null
@@ -1,14 +0,0 @@
-CMP0061
--------
-
-Support new :command:`if` IN_LIST operator.
-
-CMake 3.3 adds support for the new IN_LIST operator.
-
-The ``OLD`` behavior for this policy is to ignore the IN_LIST operator.
-The ``NEW`` behavior is to interpret the IN_LIST operator.
-
-This policy was introduced in CMake version 3.3.
-CMake version |release| warns when the policy is not set and uses
-``OLD`` behavior. Use the :command:`cmake_policy` command to set
-it to ``OLD`` or ``NEW`` explicitly.
diff --git a/Help/release/dev/if-IN_LIST.rst b/Help/release/dev/if-IN_LIST.rst
deleted file mode 100644
index 9dd0725..0000000
--- a/Help/release/dev/if-IN_LIST.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-if-IN_LIST
-----------
-
-* Add a new IN_LIST operator to if() that evaluates true
- if a given element is contained in a named list.
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index 74e8a11..0a71c60 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -15,8 +15,7 @@
cmConditionEvaluator::cmConditionEvaluator(cmMakefile& makefile):
Makefile(makefile),
Policy12Status(makefile.GetPolicyStatus(cmPolicies::CMP0012)),
- Policy54Status(makefile.GetPolicyStatus(cmPolicies::CMP0054)),
- Policy61Status(makefile.GetPolicyStatus(cmPolicies::CMP0061))
+ Policy54Status(makefile.GetPolicyStatus(cmPolicies::CMP0054))
{
}
@@ -677,41 +676,6 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList &newArgs,
reducible, arg, newArgs, argP1, argP2);
}
- if (argP1 != newArgs.end() && argP2 != newArgs.end() &&
- this->IsKeyword("IN_LIST", *argP1))
- {
- if(this->Policy61Status != cmPolicies::OLD &&
- this->Policy61Status != cmPolicies::WARN)
- {
- bool result = false;
-
- def = this->GetVariableOrString(*arg);
- def2 = this->Makefile.GetDefinition(argP2->GetValue());
-
- if(def2)
- {
- std::vector<std::string> list;
- cmSystemTools::ExpandListArgument(def2, list, true);
-
- result = std::find(list.begin(), list.end(), def) != list.end();
- }
-
- this->HandleBinaryOp(result,
- reducible, arg, newArgs, argP1, argP2);
- }
- else if(this->Policy61Status == cmPolicies::WARN)
- {
- std::ostringstream e;
- e << (this->Makefile.GetPolicies()->GetPolicyWarning(
- cmPolicies::CMP0061)) << "\n";
- e << "IN_LIST 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.";
-
- this->Makefile.IssueMessage(cmake::AUTHOR_WARNING, e.str());
- }
- }
-
++arg;
}
}
diff --git a/Source/cmConditionEvaluator.h b/Source/cmConditionEvaluator.h
index 75b7331..fcef234 100644
--- a/Source/cmConditionEvaluator.h
+++ b/Source/cmConditionEvaluator.h
@@ -93,7 +93,6 @@ private:
cmMakefile& Makefile;
cmPolicies::PolicyStatus Policy12Status;
cmPolicies::PolicyStatus Policy54Status;
- cmPolicies::PolicyStatus Policy61Status;
};
#endif
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index d4e1dd0..e7678cb 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -395,11 +395,6 @@ cmPolicies::cmPolicies()
CMP0060, "CMP0060",
"Link libraries by full path even in implicit directories.",
3,3,0, cmPolicies::WARN);
-
- this->DefinePolicy(
- CMP0061, "CMP0061",
- "Support new IN_LIST if() operator.",
- 3,3,0, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 20d357a..1d108c1 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -119,7 +119,6 @@ public:
CMP0059, ///< Do not treat ``DEFINITIONS`` as a built-in directory
/// property.
CMP0060, ///< Link libraries by full path even in implicit directories.
- CMP0061, ///< Support new IN_LIST if() operator.
/** \brief Always the last entry.
*
diff --git a/Tests/RunCMake/CMP0061/CMP0061-NEW.cmake b/Tests/RunCMake/CMP0061/CMP0061-NEW.cmake
deleted file mode 100644
index ae02850..0000000
--- a/Tests/RunCMake/CMP0061/CMP0061-NEW.cmake
+++ /dev/null
@@ -1,31 +0,0 @@
-cmake_policy(SET CMP0061 NEW)
-
-set(MY_NON_EXISTENT_LIST)
-
-set(MY_EMPTY_LIST "")
-
-set(MY_LIST foo bar)
-
-if(NOT "foo" IN_LIST MY_LIST)
- message(FATAL_ERROR "expected item 'foo' not found in list MY_LIST")
-endif()
-
-if("baz" IN_LIST MY_LIST)
- message(FATAL_ERROR "unexpected item 'baz' found in list MY_LIST")
-endif()
-
-if("foo" IN_LIST MY_NON_EXISTENT_LIST)
- message(FATAL_ERROR
- "unexpected item 'baz' found in non existent list MY_NON_EXISTENT_LIST")
-endif()
-
-if("foo" IN_LIST MY_EMPTY_LIST)
- message(FATAL_ERROR
- "unexpected item 'baz' found in empty list MY_EMPTY_LIST")
-endif()
-
-set(VAR "foo")
-
-if(NOT VAR IN_LIST MY_LIST)
- message(FATAL_ERROR "expected item VAR not found in list MY_LIST")
-endif()
diff --git a/Tests/RunCMake/CMP0061/CMP0061-OLD-result.txt b/Tests/RunCMake/CMP0061/CMP0061-OLD-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/CMP0061/CMP0061-OLD-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/CMP0061/CMP0061-OLD-stderr.txt b/Tests/RunCMake/CMP0061/CMP0061-OLD-stderr.txt
deleted file mode 100644
index 1c97b72..0000000
--- a/Tests/RunCMake/CMP0061/CMP0061-OLD-stderr.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-CMake Error at CMP0061-OLD.cmake:5 \(if\):
- if given arguments:
-
- "foo" "IN_LIST" "MY_LIST"
-
- Unknown arguments specified
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/CMP0061/CMP0061-OLD.cmake b/Tests/RunCMake/CMP0061/CMP0061-OLD.cmake
deleted file mode 100644
index d615655..0000000
--- a/Tests/RunCMake/CMP0061/CMP0061-OLD.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-cmake_policy(SET CMP0061 OLD)
-
-set(MY_LIST foo bar)
-
-if("foo" IN_LIST MY_LIST)
- message("foo is in MY_LIST")
-endif()
diff --git a/Tests/RunCMake/CMP0061/CMP0061-WARN-result.txt b/Tests/RunCMake/CMP0061/CMP0061-WARN-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/CMP0061/CMP0061-WARN-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/CMP0061/CMP0061-WARN-stderr.txt b/Tests/RunCMake/CMP0061/CMP0061-WARN-stderr.txt
deleted file mode 100644
index 3d358b0..0000000
--- a/Tests/RunCMake/CMP0061/CMP0061-WARN-stderr.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-CMake Warning \(dev\) at CMP0061-WARN.cmake:3 \(if\):
- Policy CMP0061 is not set: Support new IN_LIST if\(\) operator. Run "cmake
- --help-policy CMP0061" for policy details. Use the cmake_policy command to
- set the policy and suppress this warning.
-
- IN_LIST 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.
-
-CMake Error at CMP0061-WARN.cmake:3 \(if\):
- if given arguments:
-
- "foo" "IN_LIST" "MY_LIST"
-
- Unknown arguments specified
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/CMP0061/CMP0061-WARN.cmake b/Tests/RunCMake/CMP0061/CMP0061-WARN.cmake
deleted file mode 100644
index 45f53a5..0000000
--- a/Tests/RunCMake/CMP0061/CMP0061-WARN.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-set(MY_LIST foo bar)
-
-if("foo" IN_LIST MY_LIST)
- message("foo is in MY_LIST")
-endif()
diff --git a/Tests/RunCMake/CMP0061/CMakeLists.txt b/Tests/RunCMake/CMP0061/CMakeLists.txt
deleted file mode 100644
index 18dfd26..0000000
--- a/Tests/RunCMake/CMP0061/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-cmake_minimum_required(VERSION 3.2)
-project(${RunCMake_TEST} NONE)
-include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0061/RunCMakeTest.cmake b/Tests/RunCMake/CMP0061/RunCMakeTest.cmake
deleted file mode 100644
index 2aa5136..0000000
--- a/Tests/RunCMake/CMP0061/RunCMakeTest.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-include(RunCMake)
-
-run_cmake(CMP0061-OLD)
-run_cmake(CMP0061-WARN)
-run_cmake(CMP0061-NEW)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 812b12e..d5f1d22 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -66,7 +66,6 @@ add_RunCMake_test(CMP0055)
add_RunCMake_test(CMP0057)
add_RunCMake_test(CMP0059)
add_RunCMake_test(CMP0060)
-add_RunCMake_test(CMP0061)
if(CMAKE_GENERATOR STREQUAL "Ninja")
add_RunCMake_test(Ninja)
endif()
-----------------------------------------------------------------------
Summary of changes:
Help/command/if.rst | 3 --
Help/manual/cmake-policies.7.rst | 1 -
Help/policy/CMP0061.rst | 14 ---------
Help/release/dev/if-IN_LIST.rst | 5 ----
Source/cmConditionEvaluator.cxx | 38 +-----------------------
Source/cmConditionEvaluator.h | 1 -
Source/cmPolicies.cxx | 5 ----
Source/cmPolicies.h | 1 -
Tests/RunCMake/CMP0061/CMP0061-NEW.cmake | 31 -------------------
Tests/RunCMake/CMP0061/CMP0061-OLD-result.txt | 1 -
Tests/RunCMake/CMP0061/CMP0061-OLD-stderr.txt | 8 -----
Tests/RunCMake/CMP0061/CMP0061-OLD.cmake | 7 -----
Tests/RunCMake/CMP0061/CMP0061-WARN-result.txt | 1 -
Tests/RunCMake/CMP0061/CMP0061-WARN-stderr.txt | 19 ------------
Tests/RunCMake/CMP0061/CMP0061-WARN.cmake | 5 ----
Tests/RunCMake/CMP0061/CMakeLists.txt | 3 --
Tests/RunCMake/CMP0061/RunCMakeTest.cmake | 5 ----
Tests/RunCMake/CMakeLists.txt | 1 -
18 files changed, 1 insertion(+), 148 deletions(-)
delete mode 100644 Help/policy/CMP0061.rst
delete mode 100644 Help/release/dev/if-IN_LIST.rst
delete mode 100644 Tests/RunCMake/CMP0061/CMP0061-NEW.cmake
delete mode 100644 Tests/RunCMake/CMP0061/CMP0061-OLD-result.txt
delete mode 100644 Tests/RunCMake/CMP0061/CMP0061-OLD-stderr.txt
delete mode 100644 Tests/RunCMake/CMP0061/CMP0061-OLD.cmake
delete mode 100644 Tests/RunCMake/CMP0061/CMP0061-WARN-result.txt
delete mode 100644 Tests/RunCMake/CMP0061/CMP0061-WARN-stderr.txt
delete mode 100644 Tests/RunCMake/CMP0061/CMP0061-WARN.cmake
delete mode 100644 Tests/RunCMake/CMP0061/CMakeLists.txt
delete mode 100644 Tests/RunCMake/CMP0061/RunCMakeTest.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list