diff options
author | Brad King <brad.king@kitware.com> | 2015-10-16 13:35:34 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-10-16 13:35:34 (GMT) |
commit | f13521317a43af4ebb2996c9916d1d1da695c5fc (patch) | |
tree | 25b68105cef1bbb59f0c9980fb86d72807a97c0a /Source/cmLocalGenerator.cxx | |
parent | a4f0b01939ca7c69c1e31f017c6e87b642388252 (diff) | |
parent | 55474e6182b49acc4183fffdebccc7ae2a7335fa (diff) | |
download | CMake-f13521317a43af4ebb2996c9916d1d1da695c5fc.zip CMake-f13521317a43af4ebb2996c9916d1d1da695c5fc.tar.gz CMake-f13521317a43af4ebb2996c9916d1d1da695c5fc.tar.bz2 |
Merge topic 'clean-up-cmTarget'
55474e61 cmState: Move GetTargetTypeName from cmTarget.
38df5c36 Remove now-obsolete casts.
4ee2b267 cmGeneratorTarget: Use enum for GetType.
eac15298 cmState: Move TargetType enum from cmTarget.
482b3811 cmTarget: Move link type enum out.
2ee1cb85 cmTarget: Move ImportInfoMap out of internal class.
a48bcabd cmTarget: Move backtrace member out of internal class.
6694d993 cmTarget: Remove unneeded constructors.
983c00f8 Generators: Use GetType from the cmGeneratorTarget.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a84ce8e..e4cfcde 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -137,7 +137,7 @@ void cmLocalGenerator::TraceDependencies() t != targets.end(); ++t) { if (t->second->Target->IsImported() - || t->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY) + || t->second->GetType() == cmState::INTERFACE_LIBRARY) { continue; } @@ -472,7 +472,7 @@ void cmLocalGenerator::ComputeTargetManifest() t != targets.end(); ++t) { cmGeneratorTarget& target = *t->second; - if (target.Target->GetType() == cmTarget::INTERFACE_LIBRARY) + if (target.GetType() == cmState::INTERFACE_LIBRARY) { continue; } @@ -760,7 +760,7 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable, } if(variable == "TARGET_TYPE") { - return cmTarget::GetTargetTypeName(replaceValues.CMTarget->GetType()); + return cmState::GetTargetTypeName(replaceValues.CMTarget->GetType()); } } if(replaceValues.Output) @@ -1347,12 +1347,12 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs, switch(target->GetType()) { - case cmTarget::STATIC_LIBRARY: + case cmState::STATIC_LIBRARY: this->GetStaticLibraryFlags(linkFlags, buildType, target->Target); break; - case cmTarget::MODULE_LIBRARY: + case cmState::MODULE_LIBRARY: libraryLinkVariable = "CMAKE_MODULE_LINKER_FLAGS"; - case cmTarget::SHARED_LIBRARY: + case cmState::SHARED_LIBRARY: { linkFlags = this->Makefile->GetSafeDefinition(libraryLinkVariable); linkFlags += " "; @@ -1404,7 +1404,7 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs, *target, false, false, useWatcomQuote); } break; - case cmTarget::EXECUTABLE: + case cmState::EXECUTABLE: { linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS"); @@ -1549,7 +1549,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR"); // Flags to link an executable to shared libraries. - if (tgt.GetType() == cmTarget::EXECUTABLE && + if (tgt.GetType() == cmState::EXECUTABLE && this->StateSnapshot.GetState()-> GetGlobalPropertyAsBool("TARGET_SUPPORTS_SHARED_LIBS")) { @@ -1631,7 +1631,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, ItemVector const& items = cli.GetItems(); for(ItemVector::const_iterator li = items.begin(); li != items.end(); ++li) { - if(li->Target && li->Target->GetType() == cmTarget::INTERFACE_LIBRARY) + if(li->Target && li->Target->GetType() == cmState::INTERFACE_LIBRARY) { continue; } @@ -1817,8 +1817,8 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName, if(cmSystemTools::FileIsFullPath(inName.c_str())) { std::string tLocation; - if(target->GetType() >= cmTarget::EXECUTABLE && - target->GetType() <= cmTarget::MODULE_LIBRARY) + if(target->GetType() >= cmState::EXECUTABLE && + target->GetType() <= cmState::MODULE_LIBRARY) { tLocation = target->GetLocation(config); tLocation = cmSystemTools::GetFilenamePath(tLocation); @@ -1838,23 +1838,23 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName, } switch (target->GetType()) { - case cmTarget::EXECUTABLE: - case cmTarget::STATIC_LIBRARY: - case cmTarget::SHARED_LIBRARY: - case cmTarget::MODULE_LIBRARY: - case cmTarget::UNKNOWN_LIBRARY: + case cmState::EXECUTABLE: + case cmState::STATIC_LIBRARY: + case cmState::SHARED_LIBRARY: + case cmState::MODULE_LIBRARY: + case cmState::UNKNOWN_LIBRARY: dep = target->GetLocation(config); return true; - case cmTarget::OBJECT_LIBRARY: + case cmState::OBJECT_LIBRARY: // An object library has no single file on which to depend. // This was listed to get the target-level dependency. return false; - case cmTarget::INTERFACE_LIBRARY: + case cmState::INTERFACE_LIBRARY: // An interface library has no file on which to depend. // This was listed to get the target-level dependency. return false; - case cmTarget::UTILITY: - case cmTarget::GLOBAL_TARGET: + case cmState::UTILITY: + case cmState::GLOBAL_TARGET: // A utility target has no file on which to depend. This was listed // only to get the target-level dependency. return false; @@ -2104,8 +2104,8 @@ void cmLocalGenerator std::string warnCMP0063; std::string *pWarnCMP0063 = 0; - if (target->GetType() != cmTarget::SHARED_LIBRARY && - target->GetType() != cmTarget::MODULE_LIBRARY && + if (target->GetType() != cmState::SHARED_LIBRARY && + target->GetType() != cmState::MODULE_LIBRARY && !target->IsExecutableWithExports()) { switch (target->GetPolicyStatusCMP0063()) @@ -2134,7 +2134,7 @@ void cmLocalGenerator w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0063) << "\n" "Target \"" << target->GetName() << "\" of " - "type \"" << cmTarget::GetTargetTypeName(target->GetType()) << "\" " + "type \"" << cmState::GetTargetTypeName(target->GetType()) << "\" " "has the following visibility properties set for " << lang << ":\n" << warnCMP0063 << "For compatibility CMake is not honoring them for this target."; @@ -2151,8 +2151,8 @@ void cmLocalGenerator::AddCMP0018Flags(std::string &flags, { int targetType = target->GetType(); - bool shared = ((targetType == cmTarget::SHARED_LIBRARY) || - (targetType == cmTarget::MODULE_LIBRARY)); + bool shared = ((targetType == cmState::SHARED_LIBRARY) || + (targetType == cmState::MODULE_LIBRARY)); if (this->GetShouldUseOldFlags(shared, lang)) { @@ -2160,7 +2160,7 @@ void cmLocalGenerator::AddCMP0018Flags(std::string &flags, } else { - if (target->GetType() == cmTarget::OBJECT_LIBRARY) + if (target->GetType() == cmState::OBJECT_LIBRARY) { if (target->GetPropertyAsBool("POSITION_INDEPENDENT_CODE")) { @@ -2234,7 +2234,7 @@ void cmLocalGenerator::AddPositionIndependentFlags(std::string& flags, { const char* picFlags = 0; - if(targetType == cmTarget::EXECUTABLE) + if(targetType == cmState::EXECUTABLE) { std::string flagsVar = "CMAKE_"; flagsVar += lang; @@ -2512,7 +2512,7 @@ cmLocalGenerator cmTargets& tgts = this->Makefile->GetTargets(); for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) { - if (l->second.GetType() == cmTarget::INTERFACE_LIBRARY) + if (l->second.GetType() == cmState::INTERFACE_LIBRARY) { continue; } @@ -2540,9 +2540,9 @@ cmLocalGenerator // Generate the proper install generator for this target type. switch(l->second.GetType()) { - case cmTarget::EXECUTABLE: - case cmTarget::STATIC_LIBRARY: - case cmTarget::MODULE_LIBRARY: + case cmState::EXECUTABLE: + case cmState::STATIC_LIBRARY: + case cmState::MODULE_LIBRARY: { // Use a target install generator. cmInstallTargetGeneratorLocal @@ -2550,7 +2550,7 @@ cmLocalGenerator g.Generate(os, config, configurationTypes); } break; - case cmTarget::SHARED_LIBRARY: + case cmState::SHARED_LIBRARY: { #if defined(_WIN32) || defined(__CYGWIN__) // Special code to handle DLL. Install the import library |