diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-25 20:19:57 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-25 20:19:57 (GMT) |
commit | 6254ba95784ae29616b17ad8b42d4f31560c2c65 (patch) | |
tree | d07bd50529bb973703bec4a3c427c2a3b2ef4dc2 | |
parent | cf0a78dc4ce7debb62ceb4d12235ea75e19bebe2 (diff) | |
download | CMake-6254ba95784ae29616b17ad8b42d4f31560c2c65.zip CMake-6254ba95784ae29616b17ad8b42d4f31560c2c65.tar.gz CMake-6254ba95784ae29616b17ad8b42d4f31560c2c65.tar.bz2 |
cmMakefile: Remove Internal class.
Move only remaining state to the direct class.
-rw-r--r-- | Source/cmMakefile.cxx | 23 | ||||
-rw-r--r-- | Source/cmMakefile.h | 3 |
2 files changed, 9 insertions, 17 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 2296d5a..3289881 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -43,19 +43,12 @@ #include <ctype.h> // for isspace #include <assert.h> -class cmMakefile::Internals -{ -public: - bool IsSourceFileTryCompile; -}; - // default is not to be building executables cmMakefile::cmMakefile(cmLocalGenerator* localGenerator) - : Internal(new Internals), - LocalGenerator(localGenerator), + : LocalGenerator(localGenerator), StateSnapshot(localGenerator->GetStateSnapshot()) { - this->Internal->IsSourceFileTryCompile = false; + this->IsSourceFileTryCompile = false; // Initialize these first since AddDefaultDefinitions calls AddDefinition this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused(); @@ -3616,7 +3609,7 @@ int cmMakefile::TryCompile(const std::string& srcdir, const std::vector<std::string> *cmakeArgs, std::string& output) { - this->Internal->IsSourceFileTryCompile = fast; + this->IsSourceFileTryCompile = fast; // does the binary directory exist ? If not create it... if (!cmSystemTools::FileIsDirectory(bindir)) { @@ -3641,7 +3634,7 @@ int cmMakefile::TryCompile(const std::string& srcdir, "Internal CMake error, TryCompile bad GlobalGenerator"); // return to the original directory cmSystemTools::ChangeDirectory(cwd); - this->Internal->IsSourceFileTryCompile = false; + this->IsSourceFileTryCompile = false; return 1; } cm.SetGlobalGenerator(gg); @@ -3712,7 +3705,7 @@ int cmMakefile::TryCompile(const std::string& srcdir, "Internal CMake error, TryCompile configure of cmake failed"); // return to the original directory cmSystemTools::ChangeDirectory(cwd); - this->Internal->IsSourceFileTryCompile = false; + this->IsSourceFileTryCompile = false; return 1; } @@ -3722,7 +3715,7 @@ int cmMakefile::TryCompile(const std::string& srcdir, "Internal CMake error, TryCompile generation of cmake failed"); // return to the original directory cmSystemTools::ChangeDirectory(cwd); - this->Internal->IsSourceFileTryCompile = false; + this->IsSourceFileTryCompile = false; return 1; } @@ -3735,13 +3728,13 @@ int cmMakefile::TryCompile(const std::string& srcdir, this); cmSystemTools::ChangeDirectory(cwd); - this->Internal->IsSourceFileTryCompile = false; + this->IsSourceFileTryCompile = false; return ret; } bool cmMakefile::GetIsSourceFileTryCompile() const { - return this->Internal->IsSourceFileTryCompile; + return this->IsSourceFileTryCompile; } cmake *cmMakefile::GetCMakeInstance() const diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 055170a..1f8a054 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -62,8 +62,6 @@ class cmGeneratorExpressionEvaluationFile; */ class cmMakefile { - class Internals; - cmsys::auto_ptr<Internals> Internal; public: /* Mark a variable as used */ void MarkVariableAsUsed(const std::string& var); @@ -996,6 +994,7 @@ private: bool CheckSystemVars; bool CheckCMP0000; bool Configured; + bool IsSourceFileTryCompile; mutable bool SuppressWatches; }; |