diff options
author | Brad King <brad.king@kitware.com> | 2021-02-02 20:01:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-02-02 20:02:08 (GMT) |
commit | 8d379e7406dc6fc5b824cf9a286ee52360379b11 (patch) | |
tree | 15d5f1572f67439e161f183bbeaff6fe7ed31621 /Source/cmLocalGenerator.cxx | |
parent | 7cbaf6d87a9fe5bce98d7fad5cf7bc999fc4dc15 (diff) | |
download | CMake-8d379e7406dc6fc5b824cf9a286ee52360379b11.zip CMake-8d379e7406dc6fc5b824cf9a286ee52360379b11.tar.gz CMake-8d379e7406dc6fc5b824cf9a286ee52360379b11.tar.bz2 |
Revert "PCH: Remove restrictions for REUSE_FROM signature for MSVC"
This reverts commit 9f060971411aca979807f70307d8b9fe1b43ff24.
It was merged accidentally.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 23 |
1 files changed, 7 insertions, 16 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( |