cmState: Port dependent code to new cmStateSnapshot name
This commit is contained in:
parent
a9bf981a4c
commit
cde6eb6249
@ -280,7 +280,7 @@ void cmCTestScriptHandler::CreateCMake()
|
|||||||
this->CMake->AddCMakePaths();
|
this->CMake->AddCMakePaths();
|
||||||
this->GlobalGenerator = new cmGlobalGenerator(this->CMake);
|
this->GlobalGenerator = new cmGlobalGenerator(this->CMake);
|
||||||
|
|
||||||
cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot();
|
cmStateSnapshot snapshot = this->CMake->GetCurrentSnapshot();
|
||||||
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
||||||
snapshot.GetDirectory().SetCurrentSource(cwd);
|
snapshot.GetDirectory().SetCurrentSource(cwd);
|
||||||
snapshot.GetDirectory().SetCurrentBinary(cwd);
|
snapshot.GetDirectory().SetCurrentBinary(cwd);
|
||||||
|
@ -1062,7 +1062,7 @@ void cmGlobalGenerator::Configure()
|
|||||||
this->FirstTimeProgress = 0.0f;
|
this->FirstTimeProgress = 0.0f;
|
||||||
this->ClearGeneratorMembers();
|
this->ClearGeneratorMembers();
|
||||||
|
|
||||||
cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot();
|
cmStateSnapshot snapshot = this->CMakeInstance->GetCurrentSnapshot();
|
||||||
|
|
||||||
snapshot.GetDirectory().SetCurrentSource(
|
snapshot.GetDirectory().SetCurrentSource(
|
||||||
this->CMakeInstance->GetHomeDirectory());
|
this->CMakeInstance->GetHomeDirectory());
|
||||||
@ -1909,10 +1909,10 @@ void cmGlobalGenerator::SetConfiguredFilesPath(cmGlobalGenerator* gen)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmGlobalGenerator::IsExcluded(cmState::Snapshot const& rootSnp,
|
bool cmGlobalGenerator::IsExcluded(cmStateSnapshot const& rootSnp,
|
||||||
cmState::Snapshot const& snp_) const
|
cmStateSnapshot const& snp_) const
|
||||||
{
|
{
|
||||||
cmState::Snapshot snp = snp_;
|
cmStateSnapshot snp = snp_;
|
||||||
while (snp.IsValid()) {
|
while (snp.IsValid()) {
|
||||||
if (snp == rootSnp) {
|
if (snp == rootSnp) {
|
||||||
// No directory excludes itself.
|
// No directory excludes itself.
|
||||||
@ -1933,8 +1933,8 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
|
|||||||
{
|
{
|
||||||
assert(gen);
|
assert(gen);
|
||||||
|
|
||||||
cmState::Snapshot rootSnp = root->GetStateSnapshot();
|
cmStateSnapshot rootSnp = root->GetStateSnapshot();
|
||||||
cmState::Snapshot snp = gen->GetStateSnapshot();
|
cmStateSnapshot snp = gen->GetStateSnapshot();
|
||||||
|
|
||||||
return this->IsExcluded(rootSnp, snp);
|
return this->IsExcluded(rootSnp, snp);
|
||||||
}
|
}
|
||||||
@ -1974,7 +1974,7 @@ void cmGlobalGenerator::FillProjectMap()
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i = 0; i < this->LocalGenerators.size(); ++i) {
|
for (i = 0; i < this->LocalGenerators.size(); ++i) {
|
||||||
// for each local generator add all projects
|
// for each local generator add all projects
|
||||||
cmState::Snapshot snp = this->LocalGenerators[i]->GetStateSnapshot();
|
cmStateSnapshot snp = this->LocalGenerators[i]->GetStateSnapshot();
|
||||||
std::string name;
|
std::string name;
|
||||||
do {
|
do {
|
||||||
std::string snpProjName = snp.GetProjectName();
|
std::string snpProjName = snp.GetProjectName();
|
||||||
|
@ -410,8 +410,8 @@ protected:
|
|||||||
// has been populated.
|
// has been populated.
|
||||||
void FillProjectMap();
|
void FillProjectMap();
|
||||||
void CheckTargetProperties();
|
void CheckTargetProperties();
|
||||||
bool IsExcluded(cmState::Snapshot const& root,
|
bool IsExcluded(cmStateSnapshot const& root,
|
||||||
cmState::Snapshot const& snp) const;
|
cmStateSnapshot const& snp) const;
|
||||||
bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const;
|
bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const;
|
||||||
bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const;
|
bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const;
|
||||||
virtual void InitializeProgressMarks() {}
|
virtual void InitializeProgressMarks() {}
|
||||||
|
@ -1116,9 +1116,9 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os)
|
|||||||
|
|
||||||
// The directory-level rule should depend on the directory-level
|
// The directory-level rule should depend on the directory-level
|
||||||
// rules of the subdirectories.
|
// rules of the subdirectories.
|
||||||
std::vector<cmState::Snapshot> const& children =
|
std::vector<cmStateSnapshot> const& children =
|
||||||
lg->GetStateSnapshot().GetChildren();
|
lg->GetStateSnapshot().GetChildren();
|
||||||
for (std::vector<cmState::Snapshot>::const_iterator stateIt =
|
for (std::vector<cmStateSnapshot>::const_iterator stateIt =
|
||||||
children.begin();
|
children.begin();
|
||||||
stateIt != children.end(); ++stateIt) {
|
stateIt != children.end(); ++stateIt) {
|
||||||
targetsPerFolder[currentSourceFolder].push_back(
|
targetsPerFolder[currentSourceFolder].push_back(
|
||||||
@ -1667,8 +1667,7 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
|
|||||||
{
|
{
|
||||||
// Setup path conversions.
|
// Setup path conversions.
|
||||||
{
|
{
|
||||||
cmState::Snapshot snapshot =
|
cmStateSnapshot snapshot = this->GetCMakeInstance()->GetCurrentSnapshot();
|
||||||
this->GetCMakeInstance()->GetCurrentSnapshot();
|
|
||||||
snapshot.GetDirectory().SetCurrentSource(dir_cur_src);
|
snapshot.GetDirectory().SetCurrentSource(dir_cur_src);
|
||||||
snapshot.GetDirectory().SetCurrentBinary(dir_cur_bld);
|
snapshot.GetDirectory().SetCurrentBinary(dir_cur_bld);
|
||||||
snapshot.GetDirectory().SetRelativePathTopSource(dir_top_src.c_str());
|
snapshot.GetDirectory().SetRelativePathTopSource(dir_top_src.c_str());
|
||||||
|
@ -436,9 +436,8 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRule2(
|
|||||||
|
|
||||||
// The directory-level rule should depend on the directory-level
|
// The directory-level rule should depend on the directory-level
|
||||||
// rules of the subdirectories.
|
// rules of the subdirectories.
|
||||||
std::vector<cmState::Snapshot> children =
|
std::vector<cmStateSnapshot> children = lg->GetStateSnapshot().GetChildren();
|
||||||
lg->GetStateSnapshot().GetChildren();
|
for (std::vector<cmStateSnapshot>::const_iterator ci = children.begin();
|
||||||
for (std::vector<cmState::Snapshot>::const_iterator ci = children.begin();
|
|
||||||
ci != children.end(); ++ci) {
|
ci != children.end(); ++ci) {
|
||||||
std::string subdir = ci->GetDirectory().GetCurrentBinary();
|
std::string subdir = ci->GetDirectory().GetCurrentBinary();
|
||||||
subdir += "/";
|
subdir += "/";
|
||||||
@ -507,7 +506,7 @@ void cmGlobalUnixMakefileGenerator3::GenerateBuildCommand(
|
|||||||
if (!this->Makefiles.empty()) {
|
if (!this->Makefiles.empty()) {
|
||||||
mf = this->Makefiles[0];
|
mf = this->Makefiles[0];
|
||||||
} else {
|
} else {
|
||||||
cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot();
|
cmStateSnapshot snapshot = this->CMakeInstance->GetCurrentSnapshot();
|
||||||
snapshot.GetDirectory().SetCurrentSource(
|
snapshot.GetDirectory().SetCurrentSource(
|
||||||
this->CMakeInstance->GetHomeDirectory());
|
this->CMakeInstance->GetHomeDirectory());
|
||||||
snapshot.GetDirectory().SetCurrentBinary(
|
snapshot.GetDirectory().SetCurrentBinary(
|
||||||
@ -817,8 +816,8 @@ void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmState::Snapshot csnp = lg->GetStateSnapshot();
|
cmStateSnapshot csnp = lg->GetStateSnapshot();
|
||||||
cmState::Snapshot tsnp = tlg->GetStateSnapshot();
|
cmStateSnapshot tsnp = tlg->GetStateSnapshot();
|
||||||
|
|
||||||
// Consider the directory containing the target and all its
|
// Consider the directory containing the target and all its
|
||||||
// parents until something excludes the target.
|
// parents until something excludes the target.
|
||||||
|
@ -248,8 +248,8 @@ private:
|
|||||||
const char* GetBuildIgnoreErrorsFlag() const CM_OVERRIDE { return "-i"; }
|
const char* GetBuildIgnoreErrorsFlag() const CM_OVERRIDE { return "-i"; }
|
||||||
std::string GetEditCacheCommand() const CM_OVERRIDE;
|
std::string GetEditCacheCommand() const CM_OVERRIDE;
|
||||||
|
|
||||||
std::map<cmState::Snapshot, std::set<cmGeneratorTarget const*>,
|
std::map<cmStateSnapshot, std::set<cmGeneratorTarget const*>,
|
||||||
cmState::Snapshot::StrictWeakOrder>
|
cmStateSnapshot::StrictWeakOrder>
|
||||||
DirectoryTargetsMap;
|
DirectoryTargetsMap;
|
||||||
void InitializeProgressMarks() CM_OVERRIDE;
|
void InitializeProgressMarks() CM_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
@ -298,7 +298,7 @@ struct cmListFileBacktrace::Entry : public cmListFileContext
|
|||||||
unsigned int RefCount;
|
unsigned int RefCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot bottom, Entry* up,
|
cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* up,
|
||||||
cmListFileContext const& lfc)
|
cmListFileContext const& lfc)
|
||||||
: Bottom(bottom)
|
: Bottom(bottom)
|
||||||
, Cur(new Entry(lfc, up))
|
, Cur(new Entry(lfc, up))
|
||||||
@ -307,7 +307,7 @@ cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot bottom, Entry* up,
|
|||||||
this->Cur->Ref();
|
this->Cur->Ref();
|
||||||
}
|
}
|
||||||
|
|
||||||
cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot bottom, Entry* cur)
|
cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* cur)
|
||||||
: Bottom(bottom)
|
: Bottom(bottom)
|
||||||
, Cur(cur)
|
, Cur(cur)
|
||||||
{
|
{
|
||||||
@ -323,7 +323,7 @@ cmListFileBacktrace::cmListFileBacktrace()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot snapshot)
|
cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot snapshot)
|
||||||
: Bottom(snapshot.GetCallStackBottom())
|
: Bottom(snapshot.GetCallStackBottom())
|
||||||
, Cur(CM_NULLPTR)
|
, Cur(CM_NULLPTR)
|
||||||
{
|
{
|
||||||
|
@ -113,14 +113,14 @@ public:
|
|||||||
|
|
||||||
// Construct an empty backtrace whose bottom sits in the directory
|
// Construct an empty backtrace whose bottom sits in the directory
|
||||||
// indicated by the given valid snapshot.
|
// indicated by the given valid snapshot.
|
||||||
cmListFileBacktrace(cmState::Snapshot snapshot);
|
cmListFileBacktrace(cmStateSnapshot snapshot);
|
||||||
|
|
||||||
// Backtraces may be copied and assigned as values.
|
// Backtraces may be copied and assigned as values.
|
||||||
cmListFileBacktrace(cmListFileBacktrace const& r);
|
cmListFileBacktrace(cmListFileBacktrace const& r);
|
||||||
cmListFileBacktrace& operator=(cmListFileBacktrace const& r);
|
cmListFileBacktrace& operator=(cmListFileBacktrace const& r);
|
||||||
~cmListFileBacktrace();
|
~cmListFileBacktrace();
|
||||||
|
|
||||||
cmState::Snapshot GetBottom() const { return this->Bottom; }
|
cmStateSnapshot GetBottom() const { return this->Bottom; }
|
||||||
|
|
||||||
// Get a backtrace with the given file scope added to the top.
|
// Get a backtrace with the given file scope added to the top.
|
||||||
// May not be called until after construction with a valid snapshot.
|
// May not be called until after construction with a valid snapshot.
|
||||||
@ -147,11 +147,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
struct Entry;
|
struct Entry;
|
||||||
|
|
||||||
cmState::Snapshot Bottom;
|
cmStateSnapshot Bottom;
|
||||||
Entry* Cur;
|
Entry* Cur;
|
||||||
cmListFileBacktrace(cmState::Snapshot bottom, Entry* up,
|
cmListFileBacktrace(cmStateSnapshot bottom, Entry* up,
|
||||||
cmListFileContext const& lfc);
|
cmListFileContext const& lfc);
|
||||||
cmListFileBacktrace(cmState::Snapshot bottom, Entry* cur);
|
cmListFileBacktrace(cmStateSnapshot bottom, Entry* cur);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cmListFile
|
struct cmListFile
|
||||||
|
@ -249,7 +249,7 @@ void cmLocalGenerator::GenerateTestFiles()
|
|||||||
(*gi)->Compute(this);
|
(*gi)->Compute(this);
|
||||||
(*gi)->Generate(fout, config, configurationTypes);
|
(*gi)->Generate(fout, config, configurationTypes);
|
||||||
}
|
}
|
||||||
typedef std::vector<cmState::Snapshot> vec_t;
|
typedef std::vector<cmStateSnapshot> vec_t;
|
||||||
vec_t const& children = this->Makefile->GetStateSnapshot().GetChildren();
|
vec_t const& children = this->Makefile->GetStateSnapshot().GetChildren();
|
||||||
std::string parentBinDir = this->GetCurrentBinaryDirectory();
|
std::string parentBinDir = this->GetCurrentBinaryDirectory();
|
||||||
for (vec_t::const_iterator i = children.begin(); i != children.end(); ++i) {
|
for (vec_t::const_iterator i = children.begin(); i != children.end(); ++i) {
|
||||||
@ -446,12 +446,12 @@ void cmLocalGenerator::GenerateInstallRules()
|
|||||||
this->GenerateTargetInstallRules(fout, config, configurationTypes);
|
this->GenerateTargetInstallRules(fout, config, configurationTypes);
|
||||||
|
|
||||||
// Include install scripts from subdirectories.
|
// Include install scripts from subdirectories.
|
||||||
std::vector<cmState::Snapshot> children =
|
std::vector<cmStateSnapshot> children =
|
||||||
this->Makefile->GetStateSnapshot().GetChildren();
|
this->Makefile->GetStateSnapshot().GetChildren();
|
||||||
if (!children.empty()) {
|
if (!children.empty()) {
|
||||||
fout << "if(NOT CMAKE_INSTALL_LOCAL_ONLY)\n";
|
fout << "if(NOT CMAKE_INSTALL_LOCAL_ONLY)\n";
|
||||||
fout << " # Include the install script for each subdirectory.\n";
|
fout << " # Include the install script for each subdirectory.\n";
|
||||||
for (std::vector<cmState::Snapshot>::const_iterator ci = children.begin();
|
for (std::vector<cmStateSnapshot>::const_iterator ci = children.begin();
|
||||||
ci != children.end(); ++ci) {
|
ci != children.end(); ++ci) {
|
||||||
if (!ci->GetDirectory().GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
|
if (!ci->GetDirectory().GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
|
||||||
std::string odir = ci->GetDirectory().GetCurrentBinary();
|
std::string odir = ci->GetDirectory().GetCurrentBinary();
|
||||||
@ -563,7 +563,7 @@ cmState* cmLocalGenerator::GetState() const
|
|||||||
return this->GlobalGenerator->GetCMakeInstance()->GetState();
|
return this->GlobalGenerator->GetCMakeInstance()->GetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const
|
cmStateSnapshot cmLocalGenerator::GetStateSnapshot() const
|
||||||
{
|
{
|
||||||
return this->Makefile->GetStateSnapshot();
|
return this->Makefile->GetStateSnapshot();
|
||||||
}
|
}
|
||||||
@ -1868,7 +1868,7 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature,
|
|||||||
featureName += "_";
|
featureName += "_";
|
||||||
featureName += cmSystemTools::UpperCase(config);
|
featureName += cmSystemTools::UpperCase(config);
|
||||||
}
|
}
|
||||||
cmState::Snapshot snp = this->StateSnapshot;
|
cmStateSnapshot snp = this->StateSnapshot;
|
||||||
while (snp.IsValid()) {
|
while (snp.IsValid()) {
|
||||||
if (const char* value = snp.GetDirectory().GetProperty(featureName)) {
|
if (const char* value = snp.GetDirectory().GetProperty(featureName)) {
|
||||||
return value;
|
return value;
|
||||||
|
@ -92,7 +92,7 @@ public:
|
|||||||
cmGeneratorTarget& tgt) const;
|
cmGeneratorTarget& tgt) const;
|
||||||
|
|
||||||
cmState* GetState() const;
|
cmState* GetState() const;
|
||||||
cmState::Snapshot GetStateSnapshot() const;
|
cmStateSnapshot GetStateSnapshot() const;
|
||||||
|
|
||||||
void AddArchitectureFlags(std::string& flags,
|
void AddArchitectureFlags(std::string& flags,
|
||||||
cmGeneratorTarget const* target,
|
cmGeneratorTarget const* target,
|
||||||
@ -337,7 +337,7 @@ protected:
|
|||||||
virtual bool CheckDefinition(std::string const& define) const;
|
virtual bool CheckDefinition(std::string const& define) const;
|
||||||
|
|
||||||
cmMakefile* Makefile;
|
cmMakefile* Makefile;
|
||||||
cmState::Snapshot StateSnapshot;
|
cmStateSnapshot StateSnapshot;
|
||||||
cmListFileBacktrace DirectoryBacktrace;
|
cmListFileBacktrace DirectoryBacktrace;
|
||||||
cmGlobalGenerator* GlobalGenerator;
|
cmGlobalGenerator* GlobalGenerator;
|
||||||
std::map<std::string, std::string> UniqueObjectNamesMap;
|
std::map<std::string, std::string> UniqueObjectNamesMap;
|
||||||
|
@ -45,7 +45,7 @@ class cmMessenger;
|
|||||||
|
|
||||||
// default is not to be building executables
|
// default is not to be building executables
|
||||||
cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator,
|
cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator,
|
||||||
cmState::Snapshot const& snapshot)
|
cmStateSnapshot const& snapshot)
|
||||||
: GlobalGenerator(globalGenerator)
|
: GlobalGenerator(globalGenerator)
|
||||||
, StateSnapshot(snapshot)
|
, StateSnapshot(snapshot)
|
||||||
, Backtrace(snapshot)
|
, Backtrace(snapshot)
|
||||||
@ -1356,7 +1356,7 @@ private:
|
|||||||
cmMakefile* Makefile;
|
cmMakefile* Makefile;
|
||||||
cmGlobalGenerator* GG;
|
cmGlobalGenerator* GG;
|
||||||
cmMakefile* CurrentMakefile;
|
cmMakefile* CurrentMakefile;
|
||||||
cmState::Snapshot Snapshot;
|
cmStateSnapshot Snapshot;
|
||||||
bool ReportError;
|
bool ReportError;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1538,7 +1538,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmState::Snapshot newSnapshot =
|
cmStateSnapshot newSnapshot =
|
||||||
this->GetState()->CreateBuildsystemDirectorySnapshot(this->StateSnapshot);
|
this->GetState()->CreateBuildsystemDirectorySnapshot(this->StateSnapshot);
|
||||||
|
|
||||||
newSnapshot.GetDirectory().SetCurrentSource(srcPath);
|
newSnapshot.GetDirectory().SetCurrentSource(srcPath);
|
||||||
@ -3621,7 +3621,7 @@ void cmMakefile::AddCMakeDependFilesFromUser()
|
|||||||
std::string cmMakefile::FormatListFileStack() const
|
std::string cmMakefile::FormatListFileStack() const
|
||||||
{
|
{
|
||||||
std::vector<std::string> listFiles;
|
std::vector<std::string> listFiles;
|
||||||
cmState::Snapshot snp = this->StateSnapshot;
|
cmStateSnapshot snp = this->StateSnapshot;
|
||||||
while (snp.IsValid()) {
|
while (snp.IsValid()) {
|
||||||
listFiles.push_back(snp.GetExecutionListFile());
|
listFiles.push_back(snp.GetExecutionListFile());
|
||||||
snp = snp.GetCallStackParent();
|
snp = snp.GetCallStackParent();
|
||||||
@ -3918,7 +3918,7 @@ void cmMakefile::StoreMatches(cmsys::RegularExpression& re)
|
|||||||
this->MarkVariableAsUsed(nMatchesVariable);
|
this->MarkVariableAsUsed(nMatchesVariable);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmState::Snapshot cmMakefile::GetStateSnapshot() const
|
cmStateSnapshot cmMakefile::GetStateSnapshot() const
|
||||||
{
|
{
|
||||||
return this->StateSnapshot;
|
return this->StateSnapshot;
|
||||||
}
|
}
|
||||||
@ -3999,7 +3999,7 @@ void cmMakefile::PopPolicy()
|
|||||||
|
|
||||||
void cmMakefile::PopSnapshot(bool reportError)
|
void cmMakefile::PopSnapshot(bool reportError)
|
||||||
{
|
{
|
||||||
// cmState::Snapshot manages nested policy scopes within it.
|
// cmStateSnapshot manages nested policy scopes within it.
|
||||||
// Since the scope corresponding to the snapshot is closing,
|
// Since the scope corresponding to the snapshot is closing,
|
||||||
// reject any still-open nested policy scopes with an error.
|
// reject any still-open nested policy scopes with an error.
|
||||||
while (!this->StateSnapshot.CanPopPolicyScope()) {
|
while (!this->StateSnapshot.CanPopPolicyScope()) {
|
||||||
|
@ -70,7 +70,7 @@ public:
|
|||||||
* Construct an empty makefile.
|
* Construct an empty makefile.
|
||||||
*/
|
*/
|
||||||
cmMakefile(cmGlobalGenerator* globalGenerator,
|
cmMakefile(cmGlobalGenerator* globalGenerator,
|
||||||
const cmState::Snapshot& snapshot);
|
const cmStateSnapshot& snapshot);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor.
|
* Destructor.
|
||||||
@ -753,7 +753,7 @@ public:
|
|||||||
void ClearMatches();
|
void ClearMatches();
|
||||||
void StoreMatches(cmsys::RegularExpression& re);
|
void StoreMatches(cmsys::RegularExpression& re);
|
||||||
|
|
||||||
cmState::Snapshot GetStateSnapshot() const;
|
cmStateSnapshot GetStateSnapshot() const;
|
||||||
|
|
||||||
const char* GetDefineFlagsCMP0059() const;
|
const char* GetDefineFlagsCMP0059() const;
|
||||||
|
|
||||||
@ -829,7 +829,7 @@ private:
|
|||||||
cmMakefile(const cmMakefile& mf);
|
cmMakefile(const cmMakefile& mf);
|
||||||
cmMakefile& operator=(const cmMakefile& mf);
|
cmMakefile& operator=(const cmMakefile& mf);
|
||||||
|
|
||||||
cmState::Snapshot StateSnapshot;
|
cmStateSnapshot StateSnapshot;
|
||||||
cmListFileBacktrace Backtrace;
|
cmListFileBacktrace Backtrace;
|
||||||
|
|
||||||
void ReadListFile(cmListFile const& listFile,
|
void ReadListFile(cmListFile const& listFile,
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot)
|
cmOutputConverter::cmOutputConverter(cmStateSnapshot snapshot)
|
||||||
: StateSnapshot(snapshot)
|
: StateSnapshot(snapshot)
|
||||||
, LinkScriptShell(false)
|
, LinkScriptShell(false)
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
class cmOutputConverter
|
class cmOutputConverter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmOutputConverter(cmState::Snapshot snapshot);
|
cmOutputConverter(cmStateSnapshot snapshot);
|
||||||
|
|
||||||
enum OutputFormat
|
enum OutputFormat
|
||||||
{
|
{
|
||||||
@ -125,7 +125,7 @@ private:
|
|||||||
static std::string Shell__GetArgument(const char* in, int flags);
|
static std::string Shell__GetArgument(const char* in, int flags);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cmState::Snapshot StateSnapshot;
|
cmStateSnapshot StateSnapshot;
|
||||||
|
|
||||||
bool LinkScriptShell;
|
bool LinkScriptShell;
|
||||||
};
|
};
|
||||||
|
@ -165,7 +165,7 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
|
|||||||
cm.GetCurrentSnapshot().SetDefaultDefinitions();
|
cm.GetCurrentSnapshot().SetDefaultDefinitions();
|
||||||
cmGlobalGenerator gg(&cm);
|
cmGlobalGenerator gg(&cm);
|
||||||
|
|
||||||
cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
|
cmStateSnapshot snapshot = cm.GetCurrentSnapshot();
|
||||||
snapshot.GetDirectory().SetCurrentBinary(targetDirectory);
|
snapshot.GetDirectory().SetCurrentBinary(targetDirectory);
|
||||||
snapshot.GetDirectory().SetCurrentSource(targetDirectory);
|
snapshot.GetDirectory().SetCurrentSource(targetDirectory);
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
|
|||||||
std::string homeOutputDir = this->GetHomeOutputDirectory();
|
std::string homeOutputDir = this->GetHomeOutputDirectory();
|
||||||
this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
||||||
this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
||||||
cmState::Snapshot snapshot = this->GetCurrentSnapshot();
|
cmStateSnapshot snapshot = this->GetCurrentSnapshot();
|
||||||
snapshot.GetDirectory().SetCurrentBinary(
|
snapshot.GetDirectory().SetCurrentBinary(
|
||||||
cmSystemTools::GetCurrentWorkingDirectory());
|
cmSystemTools::GetCurrentWorkingDirectory());
|
||||||
snapshot.GetDirectory().SetCurrentSource(
|
snapshot.GetDirectory().SetCurrentSource(
|
||||||
@ -517,7 +517,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
|
|||||||
cmGlobalGenerator* gg = new cmGlobalGenerator(this);
|
cmGlobalGenerator* gg = new cmGlobalGenerator(this);
|
||||||
this->SetGlobalGenerator(gg);
|
this->SetGlobalGenerator(gg);
|
||||||
|
|
||||||
cmState::Snapshot snapshot = this->GetCurrentSnapshot();
|
cmStateSnapshot snapshot = this->GetCurrentSnapshot();
|
||||||
snapshot.GetDirectory().SetCurrentBinary(
|
snapshot.GetDirectory().SetCurrentBinary(
|
||||||
cmSystemTools::GetCurrentWorkingDirectory());
|
cmSystemTools::GetCurrentWorkingDirectory());
|
||||||
snapshot.GetDirectory().SetCurrentSource(
|
snapshot.GetDirectory().SetCurrentSource(
|
||||||
|
@ -407,14 +407,11 @@ public:
|
|||||||
void WatchUnusedCli(const std::string& var);
|
void WatchUnusedCli(const std::string& var);
|
||||||
|
|
||||||
cmState* GetState() const { return this->State; }
|
cmState* GetState() const { return this->State; }
|
||||||
void SetCurrentSnapshot(cmState::Snapshot snapshot)
|
void SetCurrentSnapshot(cmStateSnapshot snapshot)
|
||||||
{
|
{
|
||||||
this->CurrentSnapshot = snapshot;
|
this->CurrentSnapshot = snapshot;
|
||||||
}
|
}
|
||||||
cmState::Snapshot GetCurrentSnapshot() const
|
cmStateSnapshot GetCurrentSnapshot() const { return this->CurrentSnapshot; }
|
||||||
{
|
|
||||||
return this->CurrentSnapshot;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void RunCheckForUnusedVariables();
|
void RunCheckForUnusedVariables();
|
||||||
@ -490,7 +487,7 @@ private:
|
|||||||
InstalledFilesMap InstalledFiles;
|
InstalledFilesMap InstalledFiles;
|
||||||
|
|
||||||
cmState* State;
|
cmState* State;
|
||||||
cmState::Snapshot CurrentSnapshot;
|
cmStateSnapshot CurrentSnapshot;
|
||||||
cmMessenger* Messenger;
|
cmMessenger* Messenger;
|
||||||
|
|
||||||
std::vector<std::string> TraceOnlyThisSources;
|
std::vector<std::string> TraceOnlyThisSources;
|
||||||
|
@ -760,7 +760,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
|
|||||||
cm.GetCurrentSnapshot().SetDefaultDefinitions();
|
cm.GetCurrentSnapshot().SetDefaultDefinitions();
|
||||||
if (cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen)) {
|
if (cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen)) {
|
||||||
cm.SetGlobalGenerator(ggd);
|
cm.SetGlobalGenerator(ggd);
|
||||||
cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
|
cmStateSnapshot snapshot = cm.GetCurrentSnapshot();
|
||||||
snapshot.GetDirectory().SetCurrentBinary(startOutDir);
|
snapshot.GetDirectory().SetCurrentBinary(startOutDir);
|
||||||
snapshot.GetDirectory().SetCurrentSource(startDir);
|
snapshot.GetDirectory().SetCurrentSource(startDir);
|
||||||
CM_AUTO_PTR<cmMakefile> mf(new cmMakefile(ggd, snapshot));
|
CM_AUTO_PTR<cmMakefile> mf(new cmMakefile(ggd, snapshot));
|
||||||
|
Loading…
Reference in New Issue
Block a user