summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-06-11 14:25:40 (GMT)
committerBrad King <brad.king@kitware.com>2007-06-11 14:25:40 (GMT)
commit28e94533ddff2e48268ebc48707e8510a272ef48 (patch)
tree0b77dc757175fcbe25852e55ddcec4b0d4c98c1f
parent4ed167090ea412607ba128a4a5f61199c426b3a6 (diff)
downloadCMake-28e94533ddff2e48268ebc48707e8510a272ef48.zip
CMake-28e94533ddff2e48268ebc48707e8510a272ef48.tar.gz
CMake-28e94533ddff2e48268ebc48707e8510a272ef48.tar.bz2
BUG: More problems with cmMakefile copy-constructor. It seems the regular expression class cannot be assigned but does not enforce this limitation at compile time.
-rw-r--r--Source/cmMakefile.cxx15
-rw-r--r--Source/cmMakefile.h1
2 files changed, 10 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7b89fd9..d0aced8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -85,9 +85,7 @@ cmMakefile::cmMakefile()
this->AddSourceGroup("Resources", "\\.plist$");
#endif
this->AddDefaultDefinitions();
- this->cmDefineRegex.compile("#cmakedefine[ \t]+([A-Za-z_0-9]*)");
- this->cmDefine01Regex.compile("#cmakedefine01[ \t]+([A-Za-z_0-9]*)");
- this->cmAtVarRegex.compile("(@[A-Za-z_0-9/.+-]+@)");
+ this->Initialize();
this->PreOrder = false;
}
@@ -131,11 +129,16 @@ cmMakefile::cmMakefile(const cmMakefile& mf)
this->Properties = mf.Properties;
this->PreOrder = mf.PreOrder;
this->ListFileStack = mf.ListFileStack;
- this->cmDefineRegex = mf.cmDefineRegex;
- this->cmDefine01Regex = mf.cmDefine01Regex;
- this->cmAtVarRegex = mf.cmAtVarRegex;
+ this->Initialize();
}
+//----------------------------------------------------------------------------
+void cmMakefile::Initialize()
+{
+ this->cmDefineRegex.compile("#cmakedefine[ \t]+([A-Za-z_0-9]*)");
+ this->cmDefine01Regex.compile("#cmakedefine01[ \t]+([A-Za-z_0-9]*)");
+ this->cmAtVarRegex.compile("(@[A-Za-z_0-9/.+-]+@)");
+}
unsigned int cmMakefile::GetCacheMajorVersion()
{
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 93b8f02..dfd3ff8 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -783,6 +783,7 @@ protected:
bool IsFunctionBlocked(const cmListFileFunction& lff);
private:
+ void Initialize();
void ReadSources(std::ifstream& fin, bool t);
friend class cmMakeDepend; // make depend needs direct access