[Cmake-commits] CMake branch, next, updated. v3.0.0-rc5-3291-g711d6bd

Ben Boeckel ben.boeckel at kitware.com
Wed May 21 13:27:12 EDT 2014


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  711d6bd183a1fe9bfc7faf66380003f0e9eeca4e (commit)
       via  8171172474e6ec0a90131918a89a529690200643 (commit)
      from  cd27123d257999660aac9269887af2d7a3482022 (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=711d6bd183a1fe9bfc7faf66380003f0e9eeca4e
commit 711d6bd183a1fe9bfc7faf66380003f0e9eeca4e
Merge: cd27123 8171172
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed May 21 13:27:11 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 21 13:27:11 2014 -0400

    Merge topic 'dev/watch-variable-allowed-access-type' into next
    
    81711724 watch_variable: Remove excess access type


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8171172474e6ec0a90131918a89a529690200643
commit 8171172474e6ec0a90131918a89a529690200643
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed May 21 13:25:27 2014 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Wed May 21 13:25:27 2014 -0400

    watch_variable: Remove excess access type
    
    The ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS access type was switched on an
    undocumented variable and its lookup caused an unnecessary performance
    impact.

diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index f1717a0..136cf5c 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -105,4 +105,3 @@ All Policies
    /policy/CMP0051
    /policy/CMP0052
    /policy/CMP0053
-   /policy/CMP0054
diff --git a/Help/policy/CMP0054.rst b/Help/policy/CMP0054.rst
deleted file mode 100644
index 7c2b2c3..0000000
--- a/Help/policy/CMP0054.rst
+++ /dev/null
@@ -1,21 +0,0 @@
-CMP0054
--------
-
-Deprecate `ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS` :command:`variable_watch`
-access type.
-
-CMake 3.0 and lower allowed switching the access type of variable access to
-`ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS` based on the undocumented
-`CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS` variable. Since the callback is
-always called no matter what, just with a different access type based on this
-variable, the access types are now collapsed into one.
-
-The OLD behavior for this policy is to use the
-`ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS` access type based on the
-`CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS` variable. The NEW behavior for this
-policy is to always use `UNKNOWN_VARIABLE_READ_ACCESS` as the access type.
-
-This policy was introduced in CMake version 3.1.
-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/watch-variable-policy.rst b/Help/release/dev/watch-variable-policy.rst
index 0d96fb7..ab495ab 100644
--- a/Help/release/dev/watch-variable-policy.rst
+++ b/Help/release/dev/watch-variable-policy.rst
@@ -1,5 +1,4 @@
 watch-variable-policy
 ---------------------
 
-* Policy :policy:`CMP0054` introduced to improve variable lookup performance
-  for uninitialized variables.
+* Remove ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS access type in variable_watch.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 382767d..9b7290b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2472,46 +2472,8 @@ const char* cmMakefile::GetDefinition(const std::string& name) const
       }
     else
       {
-      int type = cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS;
-      switch(this->GetPolicyStatus(cmPolicies::CMP0054))
-        {
-        case cmPolicies::WARN:
-        {
-          // Warn if necessary.
-          const char* allow = this->Internal->VarStack.top()
-            .Get("CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS");
-          if(cmSystemTools::IsOn(allow))
-            {
-            this->IssueMessage(cmake::AUTHOR_WARNING,
-              this->GetPolicies()->GetPolicyWarning(cmPolicies::CMP0054));
-            // Checking again is unnecessary and doubly expensive (and the
-            // reason for the policy...); just duplicate the old behavior here.
-            type = cmVariableWatch::ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS;
-            }
-          break;
-        }
-        case cmPolicies::OLD:
-        {
-          // OLD behavior is to use ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS if
-          // needed.
-          const char* allow = this->Internal->VarStack.top()
-            .Get("CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS");
-          if(cmSystemTools::IsOn(allow))
-            {
-            type = cmVariableWatch::ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS;
-            }
-          break;
-        }
-        case cmPolicies::REQUIRED_IF_USED:
-        case cmPolicies::REQUIRED_ALWAYS:
-          this->IssueMessage(cmake::FATAL_ERROR,
-            this->GetPolicies()->GetRequiredPolicyError(cmPolicies::CMP0054));
-          break;
-        case cmPolicies::NEW:
-          // Do nothing.
-          break;
-        }
-      vv->VariableAccessed(name, type, def, this);
+      vv->VariableAccessed(name,
+          cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS, def, this);
       }
     }
 #endif
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 199497a..693945d 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -359,12 +359,6 @@ cmPolicies::cmPolicies()
     CMP0053, "CMP0053",
     "Simplify variable reference and escape sequence evaluation.",
     3,1,0, cmPolicies::WARN);
-
-  this->DefinePolicy(
-    CMP0054, "CMP0054",
-    "Remove ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS "
-    "variable_watch access type.",
-    3,1,0, cmPolicies::WARN);
 }
 
 cmPolicies::~cmPolicies()
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 99bcac7..5d69d14 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -106,7 +106,6 @@ public:
     CMP0050, ///< Disallow add_custom_command SOURCE signatures
     CMP0051, ///< List TARGET_OBJECTS in SOURCES target property
     CMP0052, ///< Reject source and build dirs in installed
-    CMP0054, ///< Remove ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS access type
     /// INTERFACE_INCLUDE_DIRECTORIES
 
     CMP0053, ///< Simplify variable reference and escape sequence evaluation
diff --git a/Tests/RunCMake/CMP0054/CMP0054-NEW-result.txt b/Tests/RunCMake/CMP0054/CMP0054-NEW-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/CMP0054/CMP0054-NEW-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/CMP0054/CMP0054-NEW-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-NEW-stderr.txt
deleted file mode 100644
index ea1cc74..0000000
--- a/Tests/RunCMake/CMP0054/CMP0054-NEW-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-^UNKNOWN_READ_ACCESS
---><--
-UNKNOWN_READ_ACCESS
---><--$
diff --git a/Tests/RunCMake/CMP0054/CMP0054-NEW.cmake b/Tests/RunCMake/CMP0054/CMP0054-NEW.cmake
deleted file mode 100644
index e4ee597..0000000
--- a/Tests/RunCMake/CMP0054/CMP0054-NEW.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-cmake_policy(SET CMP0053 NEW) # Only expand once.
-cmake_policy(SET CMP0054 NEW)
-
-function (watch_callback var access value file stack)
-  message(${access})
-endfunction ()
-
-variable_watch(uninit watch_callback)
-message("-->${uninit}<--")
-set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS ON)
-message("-->${uninit}<--")
-# Don't warn during generate
-set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS OFF)
diff --git a/Tests/RunCMake/CMP0054/CMP0054-OLD-result.txt b/Tests/RunCMake/CMP0054/CMP0054-OLD-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/CMP0054/CMP0054-OLD-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/CMP0054/CMP0054-OLD-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-OLD-stderr.txt
deleted file mode 100644
index 50d6c11..0000000
--- a/Tests/RunCMake/CMP0054/CMP0054-OLD-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-^UNKNOWN_READ_ACCESS
---><--
-ALLOWED_UNKNOWN_READ_ACCESS
---><--$
diff --git a/Tests/RunCMake/CMP0054/CMP0054-OLD.cmake b/Tests/RunCMake/CMP0054/CMP0054-OLD.cmake
deleted file mode 100644
index d8a4fc9..0000000
--- a/Tests/RunCMake/CMP0054/CMP0054-OLD.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-cmake_policy(SET CMP0053 NEW) # Only expand once.
-cmake_policy(SET CMP0054 OLD)
-
-function (watch_callback var access value file stack)
-  message(${access})
-endfunction ()
-
-variable_watch(uninit watch_callback)
-message("-->${uninit}<--")
-set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS ON)
-message("-->${uninit}<--")
-# Don't warn during generate
-set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS OFF)
diff --git a/Tests/RunCMake/CMP0054/CMP0054-WARN-result.txt b/Tests/RunCMake/CMP0054/CMP0054-WARN-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/CMP0054/CMP0054-WARN-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt
deleted file mode 100644
index 987666f..0000000
--- a/Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-^UNKNOWN_READ_ACCESS
---><--
-CMake Warning \(dev\) at CMP0054-WARN.cmake:10 \(message\):
-  Policy CMP0054 is not set: Remove ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS
-  variable_watch access type.  Run "cmake --help-policy CMP0054" for policy
-  details.  Use the cmake_policy command to set the policy and suppress this
-  warning.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
-ALLOWED_UNKNOWN_READ_ACCESS
---><--$
diff --git a/Tests/RunCMake/CMP0054/CMP0054-WARN.cmake b/Tests/RunCMake/CMP0054/CMP0054-WARN.cmake
deleted file mode 100644
index 25afc14..0000000
--- a/Tests/RunCMake/CMP0054/CMP0054-WARN.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
-cmake_policy(SET CMP0053 NEW) # Only expand once.
-
-function (watch_callback var access value file stack)
-  message(${access})
-endfunction ()
-
-variable_watch(uninit watch_callback)
-message("-->${uninit}<--")
-set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS ON)
-message("-->${uninit}<--")
-# Don't warn during generate
-set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS OFF)
diff --git a/Tests/RunCMake/CMP0054/CMakeLists.txt b/Tests/RunCMake/CMP0054/CMakeLists.txt
deleted file mode 100644
index 3482e6b..0000000
--- a/Tests/RunCMake/CMP0054/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-cmake_minimum_required(VERSION 3.0)
-project(${RunCMake_TEST} CXX)
-include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0054/RunCMakeTest.cmake b/Tests/RunCMake/CMP0054/RunCMakeTest.cmake
deleted file mode 100644
index 4cc7649..0000000
--- a/Tests/RunCMake/CMP0054/RunCMakeTest.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-include(RunCMake)
-
-run_cmake(CMP0054-OLD)
-run_cmake(CMP0054-NEW)
-run_cmake(CMP0054-WARN)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 16170a2..e797a73 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -35,7 +35,6 @@ add_RunCMake_test(CMP0046)
 add_RunCMake_test(CMP0049)
 add_RunCMake_test(CMP0050)
 add_RunCMake_test(CMP0051)
-add_RunCMake_test(CMP0054)
 add_RunCMake_test(CTest)
 if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles")
   add_RunCMake_test(CompilerChange)

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

Summary of changes:
 Help/manual/cmake-policies.7.rst               |    1 -
 Help/policy/CMP0054.rst                        |   21 ------------
 Help/release/dev/watch-variable-policy.rst     |    3 +-
 Source/cmMakefile.cxx                          |   42 ++----------------------
 Source/cmPolicies.cxx                          |    6 ----
 Source/cmPolicies.h                            |    1 -
 Tests/RunCMake/CMP0054/CMP0054-NEW-result.txt  |    1 -
 Tests/RunCMake/CMP0054/CMP0054-NEW-stderr.txt  |    4 ---
 Tests/RunCMake/CMP0054/CMP0054-NEW.cmake       |   13 --------
 Tests/RunCMake/CMP0054/CMP0054-OLD-result.txt  |    1 -
 Tests/RunCMake/CMP0054/CMP0054-OLD-stderr.txt  |    4 ---
 Tests/RunCMake/CMP0054/CMP0054-OLD.cmake       |   13 --------
 Tests/RunCMake/CMP0054/CMP0054-WARN-result.txt |    1 -
 Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt |   13 --------
 Tests/RunCMake/CMP0054/CMP0054-WARN.cmake      |   12 -------
 Tests/RunCMake/CMP0054/CMakeLists.txt          |    3 --
 Tests/RunCMake/CMP0054/RunCMakeTest.cmake      |    5 ---
 Tests/RunCMake/CMakeLists.txt                  |    1 -
 18 files changed, 3 insertions(+), 142 deletions(-)
 delete mode 100644 Help/policy/CMP0054.rst
 delete mode 100644 Tests/RunCMake/CMP0054/CMP0054-NEW-result.txt
 delete mode 100644 Tests/RunCMake/CMP0054/CMP0054-NEW-stderr.txt
 delete mode 100644 Tests/RunCMake/CMP0054/CMP0054-NEW.cmake
 delete mode 100644 Tests/RunCMake/CMP0054/CMP0054-OLD-result.txt
 delete mode 100644 Tests/RunCMake/CMP0054/CMP0054-OLD-stderr.txt
 delete mode 100644 Tests/RunCMake/CMP0054/CMP0054-OLD.cmake
 delete mode 100644 Tests/RunCMake/CMP0054/CMP0054-WARN-result.txt
 delete mode 100644 Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt
 delete mode 100644 Tests/RunCMake/CMP0054/CMP0054-WARN.cmake
 delete mode 100644 Tests/RunCMake/CMP0054/CMakeLists.txt
 delete mode 100644 Tests/RunCMake/CMP0054/RunCMakeTest.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list