summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx55
1 files changed, 28 insertions, 27 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 7d0c2da..b4ede1d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -29,6 +29,7 @@
#include "cmQtAutoGeneratorInitializer.h"
#include "cmSourceFile.h"
#include "cmState.h"
+#include "cmStateTypes.h"
#include "cmVersion.h"
#include "cmake.h"
@@ -308,7 +309,7 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
makeProgram += "/";
makeProgram += saveFile;
mf->AddCacheDefinition("CMAKE_MAKE_PROGRAM", makeProgram.c_str(),
- "make program", cmState::FILEPATH);
+ "make program", cmStateEnums::FILEPATH);
}
}
@@ -1062,7 +1063,7 @@ void cmGlobalGenerator::Configure()
this->FirstTimeProgress = 0.0f;
this->ClearGeneratorMembers();
- cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot();
+ cmStateSnapshot snapshot = this->CMakeInstance->GetCurrentSnapshot();
snapshot.GetDirectory().SetCurrentSource(
this->CMakeInstance->GetHomeDirectory());
@@ -1103,7 +1104,7 @@ void cmGlobalGenerator::Configure()
sprintf(num, "%d", static_cast<int>(this->Makefiles.size()));
this->GetCMakeInstance()->AddCacheEntry("CMAKE_NUMBER_OF_MAKEFILES", num,
"number of local generators",
- cmState::INTERNAL);
+ cmStateEnums::INTERNAL);
// check for link libraries and include directories containing "NOTFOUND"
// and for infinite loops
@@ -1371,14 +1372,14 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
filteredTargets.reserve(targets.size());
for (std::vector<cmGeneratorTarget*>::iterator ti = targets.begin();
ti != targets.end(); ++ti) {
- if ((*ti)->GetType() == cmState::GLOBAL_TARGET) {
+ if ((*ti)->GetType() == cmStateEnums::GLOBAL_TARGET) {
continue;
}
- if ((*ti)->GetType() != cmState::EXECUTABLE &&
- (*ti)->GetType() != cmState::STATIC_LIBRARY &&
- (*ti)->GetType() != cmState::SHARED_LIBRARY &&
- (*ti)->GetType() != cmState::MODULE_LIBRARY &&
- (*ti)->GetType() != cmState::OBJECT_LIBRARY) {
+ if ((*ti)->GetType() != cmStateEnums::EXECUTABLE &&
+ (*ti)->GetType() != cmStateEnums::STATIC_LIBRARY &&
+ (*ti)->GetType() != cmStateEnums::SHARED_LIBRARY &&
+ (*ti)->GetType() != cmStateEnums::MODULE_LIBRARY &&
+ (*ti)->GetType() != cmStateEnums::OBJECT_LIBRARY) {
continue;
}
if ((!(*ti)->GetPropertyAsBool("AUTOMOC") &&
@@ -1415,13 +1416,13 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
}
cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer(
- cmOutputConverter* outputConverter, cmState::Directory stateDir) const
+ cmOutputConverter* outputConverter, cmStateDirectory stateDir) const
{
return new cmLinkLineComputer(outputConverter, stateDir);
}
cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer(
- cmOutputConverter* outputConverter, cmState::Directory stateDir) const
+ cmOutputConverter* outputConverter, cmStateDirectory stateDir) const
{
return new cmMSVC60LinkLineComputer(outputConverter, stateDir);
}
@@ -1443,13 +1444,13 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo()
cmTargets& targets = mf->GetTargets();
for (cmTargets::iterator ti = targets.begin(); ti != targets.end(); ++ti) {
cmTarget* t = &ti->second;
- if (t->GetType() == cmState::GLOBAL_TARGET) {
+ if (t->GetType() == cmStateEnums::GLOBAL_TARGET) {
continue;
}
t->AppendBuildInterfaceIncludes();
- if (t->GetType() == cmState::INTERFACE_LIBRARY) {
+ if (t->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
continue;
}
@@ -1575,7 +1576,7 @@ void cmGlobalGenerator::CheckTargetProperties()
this->Makefiles[i]->ConfigureFinalPass();
cmTargets& targets = this->Makefiles[i]->GetTargets();
for (cmTargets::iterator l = targets.begin(); l != targets.end(); l++) {
- if (l->second.GetType() == cmState::INTERFACE_LIBRARY) {
+ if (l->second.GetType() == cmStateEnums::INTERFACE_LIBRARY) {
continue;
}
const cmTarget::LinkLibraryVectorType& libs =
@@ -1886,8 +1887,8 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator* gen,
this->TryCompileOuterMakefile = mf;
const char* make =
gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM");
- this->GetCMakeInstance()->AddCacheEntry("CMAKE_MAKE_PROGRAM", make,
- "make program", cmState::FILEPATH);
+ this->GetCMakeInstance()->AddCacheEntry(
+ "CMAKE_MAKE_PROGRAM", make, "make program", cmStateEnums::FILEPATH);
// copy the enabled languages
this->GetCMakeInstance()->GetState()->SetEnabledLanguages(
gen->GetCMakeInstance()->GetState()->GetEnabledLanguages());
@@ -1909,10 +1910,10 @@ void cmGlobalGenerator::SetConfiguredFilesPath(cmGlobalGenerator* gen)
}
}
-bool cmGlobalGenerator::IsExcluded(cmState::Snapshot const& rootSnp,
- cmState::Snapshot const& snp_) const
+bool cmGlobalGenerator::IsExcluded(cmStateSnapshot const& rootSnp,
+ cmStateSnapshot const& snp_) const
{
- cmState::Snapshot snp = snp_;
+ cmStateSnapshot snp = snp_;
while (snp.IsValid()) {
if (snp == rootSnp) {
// No directory excludes itself.
@@ -1933,8 +1934,8 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
{
assert(gen);
- cmState::Snapshot rootSnp = root->GetStateSnapshot();
- cmState::Snapshot snp = gen->GetStateSnapshot();
+ cmStateSnapshot rootSnp = root->GetStateSnapshot();
+ cmStateSnapshot snp = gen->GetStateSnapshot();
return this->IsExcluded(rootSnp, snp);
}
@@ -1942,7 +1943,7 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
cmGeneratorTarget* target) const
{
- if (target->GetType() == cmState::INTERFACE_LIBRARY ||
+ if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY ||
target->GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
// This target is excluded from its directory.
return true;
@@ -1974,7 +1975,7 @@ void cmGlobalGenerator::FillProjectMap()
unsigned int i;
for (i = 0; i < this->LocalGenerators.size(); ++i) {
// for each local generator add all projects
- cmState::Snapshot snp = this->LocalGenerators[i]->GetStateSnapshot();
+ cmStateSnapshot snp = this->LocalGenerators[i]->GetStateSnapshot();
std::string name;
do {
std::string snpProjName = snp.GetProjectName();
@@ -2398,8 +2399,8 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(GlobalTargetInfo const& gti,
cmMakefile* mf)
{
// Package
- cmTarget target(gti.Name, cmState::GLOBAL_TARGET, cmTarget::VisibilityNormal,
- mf);
+ cmTarget target(gti.Name, cmStateEnums::GLOBAL_TARGET,
+ cmTarget::VisibilityNormal, mf);
target.SetProperty("EXCLUDE_FROM_ALL", "TRUE");
std::vector<std::string> no_outputs;
@@ -2544,7 +2545,7 @@ void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets,
bool cmGlobalGenerator::IsRootOnlyTarget(cmGeneratorTarget* target) const
{
- return (target->GetType() == cmState::GLOBAL_TARGET ||
+ return (target->GetType() == cmStateEnums::GLOBAL_TARGET ||
target->GetName() == this->GetAllTargetName());
}
@@ -2729,7 +2730,7 @@ void cmGlobalGenerator::WriteSummary()
this->LocalGenerators[i]->GetGeneratorTargets();
for (std::vector<cmGeneratorTarget*>::iterator it = tgts.begin();
it != tgts.end(); ++it) {
- if ((*it)->GetType() == cmState::INTERFACE_LIBRARY) {
+ if ((*it)->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
continue;
}
this->WriteSummary(*it);