[Cmake-commits] CMake branch, next, updated. v2.8.2-818-g1c76a6b

Ben Boeckel ben.boeckel at kitware.com
Thu Sep 16 18:31:08 EDT 2010


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  1c76a6b5ca512d7ab242e37a054f54521fcda5fe (commit)
       via  2c82f2b75979208d9db6b514b0962f4e6b9aa05e (commit)
       via  6d7d449cb1c5d4438034936f3fb8f0e8a6800116 (commit)
       via  7740a738e0578e67ec2c408e2244703bdc22c62a (commit)
       via  bef3aeebab1a07573cde8886a7e32054bec1e850 (commit)
       via  05cb0f4daf6941482784eb06c549c5c63a9d895b (commit)
       via  91c4c9921c40361df860c1384a46ed77c6118c23 (commit)
       via  ca90f673a0f162424bd6b1ab74e72439bad9c429 (commit)
       via  f7438ca7ac62007aec39d0e9134d556607ccbff3 (commit)
       via  995cfb0e2a4d2787371f87568bc943e6ad34d55c (commit)
       via  aefc91dd3750430e085417ed7047ca3c64cdab56 (commit)
       via  a8e97f8a08f143ebc255c05a50f20b783a0fffa9 (commit)
      from  00473f893fdec3d688c1d0c589e4dc3bce2d3844 (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=1c76a6b5ca512d7ab242e37a054f54521fcda5fe
commit 1c76a6b5ca512d7ab242e37a054f54521fcda5fe
Merge: 00473f8 2c82f2b
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Sep 16 18:31:04 2010 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Sep 16 18:31:04 2010 -0400

    Merge topic 'dev/strict-mode' into next
    
    2c82f2b Exempt CMAKE(CURRENT|PARENT)_LIST_FILE from usage
    6d7d449 Ignore CLI warnings for ABI determination
    7740a73 Only return local keys that are defined
    bef3aee Use the API so that warnings can be tracked
    05cb0f4 Check for unused variables in the dtor
    91c4c99 Add test for unused warnings at the end of scope
    ca90f67 Fix detection of unused variables when setting
    f7438ca Add test for unused detection via setting it
    995cfb0 Don't warn if the variable wasn't defined
    aefc91d Add test for usage checks via unset
    a8e97f8 Remove VarRemoved code since it's been superceded


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c82f2b75979208d9db6b514b0962f4e6b9aa05e
commit 2c82f2b75979208d9db6b514b0962f4e6b9aa05e
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Sep 16 17:50:07 2010 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Sep 16 17:50:07 2010 -0400

    Exempt CMAKE(CURRENT|PARENT)_LIST_FILE from usage

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 38d8b6d..2908fa3 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -590,6 +590,7 @@ bool cmMakefile::ReadListFile(const char* filename_in,
   std::string currentFile
     = this->GetSafeDefinition("CMAKE_CURRENT_LIST_FILE");
   this->AddDefinition("CMAKE_PARENT_LIST_FILE", filename_in);
+  this->MarkVariableAsUsed("CMAKE_PARENT_LIST_FILE");
 
   const char* external = 0;
   std::string external_abs;
@@ -630,6 +631,7 @@ bool cmMakefile::ReadListFile(const char* filename_in,
     }
 
   this->AddDefinition("CMAKE_CURRENT_LIST_FILE", filenametoread);
+  this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
 
   // try to see if the list file is the top most
   // list file for a project, and if it is, then it
@@ -662,7 +664,9 @@ bool cmMakefile::ReadListFile(const char* filename_in,
       *fullPath = "";
       }
     this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
+    this->MarkVariableAsUsed("CMAKE_PARENT_LIST_FILE");
     this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
+    this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
     return false;
     }
   // add this list file to the list of dependencies
@@ -702,7 +706,9 @@ bool cmMakefile::ReadListFile(const char* filename_in,
     }
 
   this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
+  this->MarkVariableAsUsed("CMAKE_PARENT_LIST_FILE");
   this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
+  this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
 
   // pop the listfile off the stack
   this->ListFileStack.pop_back();

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6d7d449cb1c5d4438034936f3fb8f0e8a6800116
commit 6d7d449cb1c5d4438034936f3fb8f0e8a6800116
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Sep 16 17:49:37 2010 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Sep 16 17:49:37 2010 -0400

    Ignore CLI warnings for ABI determination

diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index aa21c31..81ec71c 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -32,6 +32,10 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
       ${CMAKE_BINARY_DIR} ${src}
       CMAKE_FLAGS "${CMAKE_FLAGS}"
                   "-DCMAKE_${lang}_STANDARD_LIBRARIES="
+                  # We need ignore these warnings because some platforms need
+                  # CMAKE_${lang}_STANDARD_LIBRARIES to link properly and we
+                  # don't care when we are just determining the ABI.
+                  "--no-warn-unused-cli"
       OUTPUT_VARIABLE OUTPUT
       COPY_FILE "${BIN}"
       )

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7740a738e0578e67ec2c408e2244703bdc22c62a
commit 7740a738e0578e67ec2c408e2244703bdc22c62a
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Sep 16 16:07:34 2010 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Sep 16 16:07:34 2010 -0400

    Only return local keys that are defined

diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index 34ca68d..9d28700 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -92,7 +92,10 @@ std::set<cmStdString> cmDefinitions::LocalKeys() const
   for(MapType::const_iterator mi = this->Map.begin();
       mi != this->Map.end(); ++mi)
     {
-    keys.insert(mi->first);
+    if (mi->second.Exists)
+      {
+      keys.insert(mi->first);
+      }
     }
   return keys;
 }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bef3aeebab1a07573cde8886a7e32054bec1e850
commit bef3aeebab1a07573cde8886a7e32054bec1e850
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Sep 16 16:06:16 2010 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Sep 16 16:06:16 2010 -0400

    Use the API so that warnings can be tracked

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 774612a..38d8b6d 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3477,7 +3477,7 @@ void cmMakefile::RaiseScope(const char *var, const char *varDef)
     // directory's scope was initialized by the closure of the parent
     // scope, so we do not need to localize the definition first.
     cmMakefile* parent = plg->GetMakefile();
-    parent->Internal->VarStack.top().Set(var, varDef);
+    parent->AddDefinition(var, varDef);
     }
   else
     {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05cb0f4daf6941482784eb06c549c5c63a9d895b
commit 05cb0f4daf6941482784eb06c549c5c63a9d895b
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Sep 16 16:05:59 2010 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Sep 16 16:05:59 2010 -0400

    Check for unused variables in the dtor

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 844b302..774612a 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -178,6 +178,15 @@ bool cmMakefile::NeedCacheCompatibility(int major, int minor)
 
 cmMakefile::~cmMakefile()
 {
+  std::set<cmStdString> usage = this->Internal->VarUsageStack.top();
+  std::set<cmStdString>::const_iterator it = usage.begin();
+  for (; it != usage.end(); ++it)
+    {
+    if (!this->VariableUsed(it->c_str()))
+      {
+      this->CheckForUnused("out of scope", it->c_str());
+      }
+    }
   for(std::vector<cmInstallGenerator*>::iterator
         i = this->InstallGenerators.begin();
       i != this->InstallGenerators.end(); ++i)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=91c4c9921c40361df860c1384a46ed77c6118c23
commit 91c4c9921c40361df860c1384a46ed77c6118c23
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Sep 16 13:54:16 2010 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Sep 16 13:54:16 2010 -0400

    Add test for unused warnings at the end of scope

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 739dcdf..adc4f90 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1104,6 +1104,21 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
     FAIL_REGULAR_EXPRESSION ":5: warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'")
   LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaUnset")
 
+  ADD_TEST(WarnUnusedUnusedViaScope ${CMAKE_CTEST_COMMAND}
+    --build-and-test
+    "${CMake_SOURCE_DIR}/Tests/VariableUnusedViaScope"
+    "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaScope"
+    --build-generator ${CMAKE_TEST_GENERATOR}
+    --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+    --build-noclean
+    --build-project WarnUnusedUnusedViaScope
+    --build-options "--warn-unused-vars")
+  SET_TESTS_PROPERTIES(WarnUnusedUnusedViaScope PROPERTIES
+    PASS_REGULAR_EXPRESSION "warning: \\(out of scope\\) unused variable 'UNUSED_VARIABLE'")
+  SET_TESTS_PROPERTIES(WarnUnusedUnusedViaScope PROPERTIES
+    FAIL_REGULAR_EXPRESSION "warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'")
+  LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaScope")
+
   ADD_TEST(WarnUnusedCliUnused ${CMAKE_CTEST_COMMAND}
     --build-and-test
     "${CMake_SOURCE_DIR}/Tests/VariableUsage"
diff --git a/Tests/VariableUnusedViaScope/CMakeLists.txt b/Tests/VariableUnusedViaScope/CMakeLists.txt
new file mode 100644
index 0000000..a024bc5
--- /dev/null
+++ b/Tests/VariableUnusedViaScope/CMakeLists.txt
@@ -0,0 +1,2 @@
+set(UNUSED_VARIABLE)
+# Warning should occur here

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca90f673a0f162424bd6b1ab74e72439bad9c429
commit ca90f673a0f162424bd6b1ab74e72439bad9c429
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Sep 16 13:53:41 2010 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Sep 16 13:53:41 2010 -0400

    Fix detection of unused variables when setting

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 1e12658..844b302 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1648,7 +1648,7 @@ void cmMakefile::AddDefinition(const char* name, const char* value)
 #endif
 
   this->Internal->VarStack.top().Set(name, value);
-  if ((this->Internal->VarUsageStack.size() > 1) &&
+  if (this->Internal->VarUsageStack.size() &&
       this->VariableInitialized(name))
     {
     this->CheckForUnused("changing definition", name);
@@ -1719,7 +1719,7 @@ void cmMakefile::AddCacheDefinition(const char* name, const char* value,
 void cmMakefile::AddDefinition(const char* name, bool value)
 {
   this->Internal->VarStack.top().Set(name, value? "ON" : "OFF");
-  if ((this->Internal->VarUsageStack.size() > 1) &&
+  if (this->Internal->VarUsageStack.size() &&
       this->VariableInitialized(name))
     {
     this->CheckForUnused("changing definition", name);
@@ -1763,7 +1763,7 @@ bool cmMakefile::VariableUsed(const char* var) const
 
 void cmMakefile::CheckForUnused(const char* reason, const char* name) const
 {
-  if (this->WarnUnused && !this->VariableUsed(name))
+  if (this->WarnUnused && !this->VariableUsed(name) && this->CallStack.size())
     {
     const cmListFileContext* file = this->CallStack.back().Context;
     if (this->CheckSystemVars ||

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f7438ca7ac62007aec39d0e9134d556607ccbff3
commit f7438ca7ac62007aec39d0e9134d556607ccbff3
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Sep 16 13:52:54 2010 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Sep 16 13:52:54 2010 -0400

    Add test for unused detection via setting it

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index be0c27c..739dcdf 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1074,6 +1074,21 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
     LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleGeneratorTest")
   ENDIF(APPLE AND CTEST_TEST_CPACK)
 
+  ADD_TEST(WarnUnusedUnusedViaSet ${CMAKE_CTEST_COMMAND}
+    --build-and-test
+    "${CMake_SOURCE_DIR}/Tests/VariableUnusedViaSet"
+    "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaSet"
+    --build-generator ${CMAKE_TEST_GENERATOR}
+    --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+    --build-noclean
+    --build-project WarnUnusedUnusedViaSet
+    --build-options "--warn-unused-vars")
+  SET_TESTS_PROPERTIES(WarnUnusedUnusedViaSet PROPERTIES
+    PASS_REGULAR_EXPRESSION "warning: \\(changing definition\\) unused variable 'UNUSED_VARIABLE'")
+  SET_TESTS_PROPERTIES(WarnUnusedUnusedViaSet PROPERTIES
+    FAIL_REGULAR_EXPRESSION "warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'")
+  LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaSet")
+
   ADD_TEST(WarnUnusedUnusedViaUnset ${CMAKE_CTEST_COMMAND}
     --build-and-test
     "${CMake_SOURCE_DIR}/Tests/VariableUnusedViaUnset"
diff --git a/Tests/VariableUnusedViaSet/CMakeLists.txt b/Tests/VariableUnusedViaSet/CMakeLists.txt
new file mode 100644
index 0000000..0123ab2
--- /dev/null
+++ b/Tests/VariableUnusedViaSet/CMakeLists.txt
@@ -0,0 +1,4 @@
+set(UNUSED_VARIABLE)
+# Warning should occur here
+set(UNUSED_VARIABLE "Usage")
+message(STATUS "${UNUSED_VARIABLE}")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=995cfb0e2a4d2787371f87568bc943e6ad34d55c
commit 995cfb0e2a4d2787371f87568bc943e6ad34d55c
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Sep 16 13:52:17 2010 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Sep 16 13:52:17 2010 -0400

    Don't warn if the variable wasn't defined

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index a7f86ae..1e12658 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1783,8 +1783,13 @@ void cmMakefile::CheckForUnused(const char* reason, const char* name) const
 void cmMakefile::RemoveDefinition(const char* name)
 {
   this->Internal->VarStack.top().Set(name, 0);
+  if (this->Internal->VarUsageStack.size() &&
+      this->VariableInitialized(name))
+    {
+    this->CheckForUnused("unsetting", name);
+    this->Internal->VarUsageStack.top().erase(name);
+    }
   this->Internal->VarInitStack.top().insert(name);
-  this->CheckForUnused("unsetting", name);
 #ifdef CMAKE_BUILD_WITH_CMAKE
   cmVariableWatch* vv = this->GetVariableWatch();
   if ( vv )

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aefc91dd3750430e085417ed7047ca3c64cdab56
commit aefc91dd3750430e085417ed7047ca3c64cdab56
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Sep 16 13:51:51 2010 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Sep 16 13:51:51 2010 -0400

    Add test for usage checks via unset

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 995a749..be0c27c 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1074,6 +1074,21 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
     LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleGeneratorTest")
   ENDIF(APPLE AND CTEST_TEST_CPACK)
 
+  ADD_TEST(WarnUnusedUnusedViaUnset ${CMAKE_CTEST_COMMAND}
+    --build-and-test
+    "${CMake_SOURCE_DIR}/Tests/VariableUnusedViaUnset"
+    "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaUnset"
+    --build-generator ${CMAKE_TEST_GENERATOR}
+    --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+    --build-noclean
+    --build-project WarnUnusedUnusedViaUnset
+    --build-options "--warn-unused-vars")
+  SET_TESTS_PROPERTIES(WarnUnusedUnusedViaUnset PROPERTIES
+    PASS_REGULAR_EXPRESSION ":7: warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'")
+  SET_TESTS_PROPERTIES(WarnUnusedUnusedViaUnset PROPERTIES
+    FAIL_REGULAR_EXPRESSION ":5: warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'")
+  LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaUnset")
+
   ADD_TEST(WarnUnusedCliUnused ${CMAKE_CTEST_COMMAND}
     --build-and-test
     "${CMake_SOURCE_DIR}/Tests/VariableUsage"
diff --git a/Tests/VariableUnusedViaUnset/CMakeLists.txt b/Tests/VariableUnusedViaUnset/CMakeLists.txt
new file mode 100644
index 0000000..886508e
--- /dev/null
+++ b/Tests/VariableUnusedViaUnset/CMakeLists.txt
@@ -0,0 +1,8 @@
+# NOTE: Changing lines in here changes the test results since the first
+# instance shouldn't warn, but the second should and they have the same message
+
+# A warning should NOT ne issued for this line:
+set(UNUSED_VARIABLE)
+# Warning should occur here:
+set(UNUSED_VARIABLE)
+message(STATUS "${UNUSED_VARIABLE}")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8e97f8a08f143ebc255c05a50f20b783a0fffa9
commit a8e97f8a08f143ebc255c05a50f20b783a0fffa9
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Sep 16 13:50:39 2010 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Sep 16 13:50:39 2010 -0400

    Remove VarRemoved code since it's been superceded

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index df871ec..a7f86ae 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -45,7 +45,6 @@ public:
   std::stack<cmDefinitions, std::list<cmDefinitions> > VarStack;
   std::stack<std::set<cmStdString> > VarInitStack;
   std::stack<std::set<cmStdString> > VarUsageStack;
-  std::set<cmStdString> VarRemoved;
 };
 
 // default is not to be building executables
@@ -1762,15 +1761,6 @@ bool cmMakefile::VariableUsed(const char* var) const
   return false;
 }
 
-bool cmMakefile::VariableCleared(const char* var) const
-{
-  if(this->Internal->VarRemoved.find(var) != this->Internal->VarRemoved.end())
-    {
-    return true;
-    }
-  return false;
-}
-
 void cmMakefile::CheckForUnused(const char* reason, const char* name) const
 {
   if (this->WarnUnused && !this->VariableUsed(name))
@@ -1793,7 +1783,6 @@ void cmMakefile::CheckForUnused(const char* reason, const char* name) const
 void cmMakefile::RemoveDefinition(const char* name)
 {
   this->Internal->VarStack.top().Set(name, 0);
-  this->Internal->VarRemoved.insert(name);
   this->Internal->VarInitStack.top().insert(name);
   this->CheckForUnused("unsetting", name);
 #ifdef CMAKE_BUILD_WITH_CMAKE
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 7826903..9d9606d 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -67,10 +67,6 @@ public:
   bool VariableInitialized(const char* ) const;
   /* return true if a variable has been used */
   bool VariableUsed(const char* ) const;
-  /* return true if a variable has been set with
-     set(foo )
-  */
-  bool VariableCleared(const char* ) const;
   /** Return whether compatibility features needed for a version of
       the cache or lower should be enabled.  */
   bool NeedCacheCompatibility(int major, int minor);

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

Summary of changes:
 Modules/CMakeDetermineCompilerABI.cmake     |    4 ++
 Source/cmDefinitions.cxx                    |    5 ++-
 Source/cmMakefile.cxx                       |   41 +++++++++++++++---------
 Source/cmMakefile.h                         |    4 --
 Tests/CMakeLists.txt                        |   45 +++++++++++++++++++++++++++
 Tests/VariableUnusedViaScope/CMakeLists.txt |    2 +
 Tests/VariableUnusedViaSet/CMakeLists.txt   |    4 ++
 Tests/VariableUnusedViaUnset/CMakeLists.txt |    8 +++++
 8 files changed, 92 insertions(+), 21 deletions(-)
 create mode 100644 Tests/VariableUnusedViaScope/CMakeLists.txt
 create mode 100644 Tests/VariableUnusedViaSet/CMakeLists.txt
 create mode 100644 Tests/VariableUnusedViaUnset/CMakeLists.txt


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list