cmMakefile: Remove Internal class.
Move only remaining state to the direct class.
This commit is contained in:
parent
cf0a78dc4c
commit
6254ba9578
@ -43,19 +43,12 @@
|
|||||||
#include <ctype.h> // for isspace
|
#include <ctype.h> // for isspace
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
class cmMakefile::Internals
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
bool IsSourceFileTryCompile;
|
|
||||||
};
|
|
||||||
|
|
||||||
// default is not to be building executables
|
// default is not to be building executables
|
||||||
cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
|
cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
|
||||||
: Internal(new Internals),
|
: LocalGenerator(localGenerator),
|
||||||
LocalGenerator(localGenerator),
|
|
||||||
StateSnapshot(localGenerator->GetStateSnapshot())
|
StateSnapshot(localGenerator->GetStateSnapshot())
|
||||||
{
|
{
|
||||||
this->Internal->IsSourceFileTryCompile = false;
|
this->IsSourceFileTryCompile = false;
|
||||||
|
|
||||||
// Initialize these first since AddDefaultDefinitions calls AddDefinition
|
// Initialize these first since AddDefaultDefinitions calls AddDefinition
|
||||||
this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused();
|
this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused();
|
||||||
@ -3616,7 +3609,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
|
|||||||
const std::vector<std::string> *cmakeArgs,
|
const std::vector<std::string> *cmakeArgs,
|
||||||
std::string& output)
|
std::string& output)
|
||||||
{
|
{
|
||||||
this->Internal->IsSourceFileTryCompile = fast;
|
this->IsSourceFileTryCompile = fast;
|
||||||
// does the binary directory exist ? If not create it...
|
// does the binary directory exist ? If not create it...
|
||||||
if (!cmSystemTools::FileIsDirectory(bindir))
|
if (!cmSystemTools::FileIsDirectory(bindir))
|
||||||
{
|
{
|
||||||
@ -3641,7 +3634,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
|
|||||||
"Internal CMake error, TryCompile bad GlobalGenerator");
|
"Internal CMake error, TryCompile bad GlobalGenerator");
|
||||||
// return to the original directory
|
// return to the original directory
|
||||||
cmSystemTools::ChangeDirectory(cwd);
|
cmSystemTools::ChangeDirectory(cwd);
|
||||||
this->Internal->IsSourceFileTryCompile = false;
|
this->IsSourceFileTryCompile = false;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
cm.SetGlobalGenerator(gg);
|
cm.SetGlobalGenerator(gg);
|
||||||
@ -3712,7 +3705,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
|
|||||||
"Internal CMake error, TryCompile configure of cmake failed");
|
"Internal CMake error, TryCompile configure of cmake failed");
|
||||||
// return to the original directory
|
// return to the original directory
|
||||||
cmSystemTools::ChangeDirectory(cwd);
|
cmSystemTools::ChangeDirectory(cwd);
|
||||||
this->Internal->IsSourceFileTryCompile = false;
|
this->IsSourceFileTryCompile = false;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3722,7 +3715,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
|
|||||||
"Internal CMake error, TryCompile generation of cmake failed");
|
"Internal CMake error, TryCompile generation of cmake failed");
|
||||||
// return to the original directory
|
// return to the original directory
|
||||||
cmSystemTools::ChangeDirectory(cwd);
|
cmSystemTools::ChangeDirectory(cwd);
|
||||||
this->Internal->IsSourceFileTryCompile = false;
|
this->IsSourceFileTryCompile = false;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3735,13 +3728,13 @@ int cmMakefile::TryCompile(const std::string& srcdir,
|
|||||||
this);
|
this);
|
||||||
|
|
||||||
cmSystemTools::ChangeDirectory(cwd);
|
cmSystemTools::ChangeDirectory(cwd);
|
||||||
this->Internal->IsSourceFileTryCompile = false;
|
this->IsSourceFileTryCompile = false;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmMakefile::GetIsSourceFileTryCompile() const
|
bool cmMakefile::GetIsSourceFileTryCompile() const
|
||||||
{
|
{
|
||||||
return this->Internal->IsSourceFileTryCompile;
|
return this->IsSourceFileTryCompile;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmake *cmMakefile::GetCMakeInstance() const
|
cmake *cmMakefile::GetCMakeInstance() const
|
||||||
|
@ -62,8 +62,6 @@ class cmGeneratorExpressionEvaluationFile;
|
|||||||
*/
|
*/
|
||||||
class cmMakefile
|
class cmMakefile
|
||||||
{
|
{
|
||||||
class Internals;
|
|
||||||
cmsys::auto_ptr<Internals> Internal;
|
|
||||||
public:
|
public:
|
||||||
/* Mark a variable as used */
|
/* Mark a variable as used */
|
||||||
void MarkVariableAsUsed(const std::string& var);
|
void MarkVariableAsUsed(const std::string& var);
|
||||||
@ -996,6 +994,7 @@ private:
|
|||||||
bool CheckSystemVars;
|
bool CheckSystemVars;
|
||||||
bool CheckCMP0000;
|
bool CheckCMP0000;
|
||||||
bool Configured;
|
bool Configured;
|
||||||
|
bool IsSourceFileTryCompile;
|
||||||
mutable bool SuppressWatches;
|
mutable bool SuppressWatches;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user