summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-03-12 17:02:30 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2008-03-12 17:02:30 -0400
commit8bf388109d1d95d1f269b6e78c90e88f217bafa3 (patch)
tree3105caee884426df3faaf472d12abb1586236a1e
parentf64d3d0b77bfa41d64cf86e1b60e499eba7a813c (diff)
downloadcmake-8bf388109d1d95d1f269b6e78c90e88f217bafa3.tar.gz
ENH: make sure properties are re-set on each configure
-rw-r--r--Source/cmake.cxx26
-rw-r--r--Source/cmake.h1
2 files changed, 18 insertions, 9 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index c6b4052642..caf4f37f21 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -146,15 +146,7 @@ cmake::cmake()
this->FileComparison = new cmFileTimeComparison;
this->Policies = new cmPolicies();
-
- this->Properties.SetCMakeInstance(this);
-
- // initialize properties
- cmSourceFile::DefineProperties(this);
- cmTarget::DefineProperties(this);
- cmMakefile::DefineProperties(this);
- cmTest::DefineProperties(this);
- cmake::DefineProperties(this);
+ this->InitializeProperties();
#ifdef __APPLE__
struct rlimit rlp;
@@ -224,8 +216,24 @@ cmake::~cmake()
delete this->FileComparison;
}
+void cmake::InitializeProperties()
+{
+ this->Properties.clear();
+ this->Properties.SetCMakeInstance(this);
+
+ // initialize properties
+ cmSourceFile::DefineProperties(this);
+ cmTarget::DefineProperties(this);
+ cmMakefile::DefineProperties(this);
+ cmTest::DefineProperties(this);
+ cmake::DefineProperties(this);
+ this->AccessedProperties.clear();
+ this->PropertyDefinitions.clear();
+}
+
void cmake::CleanupCommandsAndMacros()
{
+ this->InitializeProperties();
std::vector<cmCommand*> commands;
for(RegisteredCommandsMap::iterator j = this->Commands.begin();
j != this->Commands.end(); ++j)
diff --git a/Source/cmake.h b/Source/cmake.h
index 416db7ff2b..cb130bcaa5 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -349,6 +349,7 @@ class cmake
this->SuppressDevWarnings = v;
}
protected:
+ void InitializeProperties();
int HandleDeleteCacheVariables(const char* var);
cmPropertyMap Properties;
std::set<std::pair<cmStdString,cmProperty::ScopeType> > AccessedProperties;