summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-02-02 20:02:58 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-02-02 20:03:18 (GMT)
commit9e2e96f5ada39fd3e688f59baf6cc5a8b65ed6e3 (patch)
tree15d5f1572f67439e161f183bbeaff6fe7ed31621 /Source
parent7cbaf6d87a9fe5bce98d7fad5cf7bc999fc4dc15 (diff)
parent8d379e7406dc6fc5b824cf9a286ee52360379b11 (diff)
downloadCMake-9e2e96f5ada39fd3e688f59baf6cc5a8b65ed6e3.zip
CMake-9e2e96f5ada39fd3e688f59baf6cc5a8b65ed6e3.tar.gz
CMake-9e2e96f5ada39fd3e688f59baf6cc5a8b65ed6e3.tar.bz2
Merge topic 'revert-pch-reuse-from-obj-msvc'
8d379e7406 Revert "PCH: Remove restrictions for REUSE_FROM signature for MSVC" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5764
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx23
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx3
-rw-r--r--Source/cmMakefileTargetGenerator.cxx4
3 files changed, 8 insertions, 22 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 3111911..349b53b 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2610,25 +2610,16 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
}
}
- // Link to the pch object file
- std::string pchSourceObj =
- reuseTarget->GetPchFileObject(config, lang, arch);
-
- if (target->GetType() != cmStateEnums::OBJECT_LIBRARY) {
- std::string linkerProperty = "LINK_FLAGS_";
- if (target->GetType() == cmStateEnums::STATIC_LIBRARY) {
- linkerProperty = "STATIC_LIBRARY_FLAGS_";
- }
+ if (reuseTarget->GetType() != cmStateEnums::OBJECT_LIBRARY) {
+ std::string pchSourceObj =
+ reuseTarget->GetPchFileObject(config, lang, arch);
+
+ // Link to the pch object file
target->Target->AppendProperty(
- cmStrCat(linkerProperty, configUpper),
+ cmStrCat("LINK_FLAGS_", configUpper),
cmStrCat(" ",
this->ConvertToOutputFormat(pchSourceObj, SHELL)),
true);
- } else {
- target->Target->AppendProperty(
- "INTERFACE_LINK_LIBRARIES",
- cmStrCat("$<$<CONFIG:", config,
- ">:$<LINK_ONLY:", pchSourceObj, ">>"));
}
}
} else {
@@ -2747,7 +2738,7 @@ void cmLocalGenerator::CopyPchCompilePdb(
this->AddCustomCommandToTarget(
target->GetName(), outputs, no_deps, commandLines,
cmCustomCommandType::PRE_BUILD, no_message, no_current_dir, true, false,
- "", "", false, cmObjectLibraryCommands::Accept, stdPipesUTF8);
+ "", "", false, cmObjectLibraryCommands::Reject, stdPipesUTF8);
} else {
cmImplicitDependsList no_implicit_depends;
cmSourceFile* copy_rule = this->AddCustomCommandToOutput(
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 97869c2..d2cdb99 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1010,8 +1010,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(
this->GetStaticLibraryFlags(
libflags, configName, target->GetLinkerLanguage(configName), target);
if (!libflags.empty()) {
- fout << "\t\t\t\tAdditionalOptions=\"" << this->EscapeForXML(libflags)
- << "\"\n";
+ fout << "\t\t\t\tAdditionalOptions=\"" << libflags << "\"\n";
}
fout << "\t\t\t\tOutputFile=\""
<< this->ConvertToXMLOutputPathSingle(libpath) << "\"/>\n";
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 4918bf6..adf40b0 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -815,10 +815,6 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
// avoiding a trailing backslash in the argument.
targetOutPathCompilePDB.back() = '/';
}
-
- std::string compilePdbOutputPath =
- this->GeneratorTarget->GetCompilePDBDirectory(this->GetConfigName());
- cmSystemTools::MakeDirectory(compilePdbOutputPath);
}
cmRulePlaceholderExpander::RuleVariables vars;
vars.CMTargetName = this->GeneratorTarget->GetName().c_str();