diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-07 22:21:51 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-14 22:41:39 (GMT) |
commit | eac15298a80b814e9d5fd0077a8c5bbcbd05a8c6 (patch) | |
tree | 459a8a5cdf05e1ea7a2e767699df59b9218ff5ca /Source/cmNinjaNormalTargetGenerator.cxx | |
parent | 482b3811e4e6043c71632b560f2e773289eeb320 (diff) | |
download | CMake-eac15298a80b814e9d5fd0077a8c5bbcbd05a8c6.zip CMake-eac15298a80b814e9d5fd0077a8c5bbcbd05a8c6.tar.gz CMake-eac15298a80b814e9d5fd0077a8c5bbcbd05a8c6.tar.bz2 |
cmState: Move TargetType enum from cmTarget.
Mostly automated:
values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType")
for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 02e47bd..b5648fe 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -41,7 +41,7 @@ cmNinjaNormalTargetGenerator(cmGeneratorTarget* target) , TargetLinkLanguage("") { this->TargetLinkLanguage = target->GetLinkerLanguage(this->GetConfigName()); - if (target->GetType() == cmTarget::EXECUTABLE) + if (target->GetType() == cmState::EXECUTABLE) this->GetGeneratorTarget()->GetExecutableNames(this->TargetNameOut, this->TargetNameReal, this->TargetNameImport, @@ -55,7 +55,7 @@ cmNinjaNormalTargetGenerator(cmGeneratorTarget* target) this->TargetNamePDB, GetLocalGenerator()->GetConfigName()); - if(target->GetType() != cmTarget::OBJECT_LIBRARY) + if(target->GetType() != cmState::OBJECT_LIBRARY) { // on Windows the output dir is already needed at compile time // ensure the directory exists (OutDir test) @@ -87,7 +87,7 @@ void cmNinjaNormalTargetGenerator::Generate() // Write the build statements this->WriteObjectBuildStatements(); - if(this->GetGeneratorTarget()->GetType() == cmTarget::OBJECT_LIBRARY) + if(this->GetGeneratorTarget()->GetType() == cmState::OBJECT_LIBRARY) { this->WriteObjectLibStatement(); } @@ -134,16 +134,16 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules() const char *cmNinjaNormalTargetGenerator::GetVisibleTypeName() const { switch (this->GetGeneratorTarget()->GetType()) { - case cmTarget::STATIC_LIBRARY: + case cmState::STATIC_LIBRARY: return "static library"; - case cmTarget::SHARED_LIBRARY: + case cmState::SHARED_LIBRARY: return "shared library"; - case cmTarget::MODULE_LIBRARY: + case cmState::MODULE_LIBRARY: if (this->GetTarget()->IsCFBundleOnApple()) return "CFBundle shared module"; else return "shared module"; - case cmTarget::EXECUTABLE: + case cmState::EXECUTABLE: return "executable"; default: return 0; @@ -157,7 +157,7 @@ cmNinjaNormalTargetGenerator return this->TargetLinkLanguage + "_" + cmTarget::GetTargetTypeName( - (cmTarget::TargetType)this->GetGeneratorTarget()->GetType()) + (cmState::TargetType)this->GetGeneratorTarget()->GetType()) + "_LINKER__" + cmGlobalNinjaGenerator::EncodeRuleName(this->GetTarget()->GetName()) ; @@ -167,8 +167,8 @@ void cmNinjaNormalTargetGenerator ::WriteLinkRule(bool useResponseFile) { - cmTarget::TargetType targetType = - (cmTarget::TargetType)this->GetGeneratorTarget()->GetType(); + cmState::TargetType targetType = + (cmState::TargetType)this->GetGeneratorTarget()->GetType(); std::string ruleName = this->LanguageLinkerRule(); // Select whether to use a response file for objects. @@ -242,7 +242,7 @@ cmNinjaNormalTargetGenerator vars.Manifests = "$MANIFESTS"; std::string langFlags; - if (targetType != cmTarget::EXECUTABLE) + if (targetType != cmState::EXECUTABLE) { langFlags += "$LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS"; vars.LanguageCompileFlags = langFlags.c_str(); @@ -285,7 +285,7 @@ cmNinjaNormalTargetGenerator std::string cmakeCommand = this->GetLocalGenerator()->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); - if (targetType == cmTarget::EXECUTABLE) + if (targetType == cmState::EXECUTABLE) this->GetGlobalGenerator()->AddRule("CMAKE_SYMLINK_EXECUTABLE", cmakeCommand + " -E cmake_symlink_executable" @@ -333,7 +333,7 @@ cmNinjaNormalTargetGenerator } } switch (this->GetGeneratorTarget()->GetType()) { - case cmTarget::STATIC_LIBRARY: { + case cmState::STATIC_LIBRARY: { // We have archive link commands set. First, delete the existing archive. { std::string cmakeCommand = @@ -358,9 +358,9 @@ cmNinjaNormalTargetGenerator } return linkCmds; } - case cmTarget::SHARED_LIBRARY: - case cmTarget::MODULE_LIBRARY: - case cmTarget::EXECUTABLE: + case cmState::SHARED_LIBRARY: + case cmState::MODULE_LIBRARY: + case cmState::EXECUTABLE: break; default: assert(0 && "Unexpected target type"); @@ -443,7 +443,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() // Write comments. cmGlobalNinjaGenerator::WriteDivider(this->GetBuildFileStream()); - const cmTarget::TargetType targetType = target.GetType(); + const cmState::TargetType targetType = target.GetType(); this->GetBuildFileStream() << "# Link build statements for " << cmTarget::GetTargetTypeName(targetType) @@ -490,7 +490,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() &genTarget, useWatcomQuote); if(this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") - && target.GetType() == cmTarget::SHARED_LIBRARY) + && target.GetType() == cmState::SHARED_LIBRARY) { if(target.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) { @@ -518,7 +518,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() // Compute architecture specific link flags. Yes, these go into a different // variable for executables, probably due to a mistake made when duplicating // code between the Makefile executable and library generators. - if (targetType == cmTarget::EXECUTABLE) + if (targetType == cmState::EXECUTABLE) { std::string t = vars["FLAGS"]; localGen.AddArchitectureFlags(t, &genTarget, TargetLinkLanguage, cfgName); @@ -538,7 +538,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() { vars["SONAME_FLAG"] = mf->GetSONameFlag(this->TargetLinkLanguage); vars["SONAME"] = this->TargetNameSO; - if (targetType == cmTarget::SHARED_LIBRARY) + if (targetType == cmState::SHARED_LIBRARY) { std::string install_dir = this->GetGeneratorTarget()->GetInstallNameDirForBuildTree(cfgName); @@ -626,7 +626,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() } // maybe create .def file from list of objects - if (target.GetType() == cmTarget::SHARED_LIBRARY && + if (target.GetType() == cmState::SHARED_LIBRARY && this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if(target.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) @@ -734,7 +734,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() if (targetOutput != targetOutputReal && !target.IsFrameworkOnApple()) { - if (targetType == cmTarget::EXECUTABLE) + if (targetType == cmState::EXECUTABLE) { globalGen.WriteBuild(this->GetBuildFileStream(), "Create executable symlink " + targetOutput, |