diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-18 19:28:46 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-19 13:40:58 (GMT) |
commit | a49751fb2eed0ca6415b243c35b23201b8060597 (patch) | |
tree | a96a9932ebefd4fb254ac2c769bee78fc6aefdb9 /Source/cmGlobalNinjaGenerator.cxx | |
parent | 0060391dffe824526b1f359db79c66c55e53d0c5 (diff) | |
download | CMake-a49751fb2eed0ca6415b243c35b23201b8060597.zip CMake-a49751fb2eed0ca6415b243c35b23201b8060597.tar.gz CMake-a49751fb2eed0ca6415b243c35b23201b8060597.tar.bz2 |
cmState: Move TargetType enum to separate namespace
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 67df038..98654c5 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -956,17 +956,17 @@ void cmGlobalNinjaGenerator::AppendTargetOutputs( bool realname = target->IsFrameworkOnApple(); switch (target->GetType()) { - case cmState::EXECUTABLE: - case cmState::SHARED_LIBRARY: - case cmState::STATIC_LIBRARY: - case cmState::MODULE_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: { outputs.push_back(this->ConvertToNinjaPath( target->GetFullPath(configName, false, realname))); break; } - case cmState::OBJECT_LIBRARY: - case cmState::GLOBAL_TARGET: - case cmState::UTILITY: { + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::GLOBAL_TARGET: + case cmStateEnums::UTILITY: { std::string path = target->GetLocalGenerator()->GetCurrentBinaryDirectory() + std::string("/") + target->GetName(); @@ -982,7 +982,7 @@ void cmGlobalNinjaGenerator::AppendTargetOutputs( void cmGlobalNinjaGenerator::AppendTargetDepends( cmGeneratorTarget const* target, cmNinjaDeps& outputs) { - if (target->GetType() == cmState::GLOBAL_TARGET) { + if (target->GetType() == cmStateEnums::GLOBAL_TARGET) { // These depend only on other CMake-provided targets, e.g. "all". std::set<std::string> const& utils = target->GetUtilities(); for (std::set<std::string>::const_iterator i = utils.begin(); @@ -997,7 +997,7 @@ void cmGlobalNinjaGenerator::AppendTargetDepends( cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target); for (cmTargetDependSet::const_iterator i = targetDeps.begin(); i != targetDeps.end(); ++i) { - if ((*i)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*i)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } this->AppendTargetOutputs(*i, outs); @@ -1034,7 +1034,7 @@ void cmGlobalNinjaGenerator::ComputeTargetDependsClosure( cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target); for (cmTargetDependSet::const_iterator i = targetDeps.begin(); i != targetDeps.end(); ++i) { - if ((*i)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*i)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } if (depends.insert(*i).second) { @@ -1102,11 +1102,13 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) lg->GetGeneratorTargets().begin(); ti != lg->GetGeneratorTargets().end(); ++ti) { cmGeneratorTarget const* gt = *ti; - cmState::TargetType const type = gt->GetType(); - if ((type == cmState::EXECUTABLE || type == cmState::STATIC_LIBRARY || - type == cmState::SHARED_LIBRARY || - type == cmState::MODULE_LIBRARY || - type == cmState::OBJECT_LIBRARY || type == cmState::UTILITY) && + cmStateEnums::TargetType const type = gt->GetType(); + if ((type == cmStateEnums::EXECUTABLE || + type == cmStateEnums::STATIC_LIBRARY || + type == cmStateEnums::SHARED_LIBRARY || + type == cmStateEnums::MODULE_LIBRARY || + type == cmStateEnums::OBJECT_LIBRARY || + type == cmStateEnums::UTILITY) && !gt->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { targetsPerFolder[currentSourceFolder].push_back(gt->GetName()); } |