mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
PCH: Fixed Ninja Multi-Config and REUSE_FROM for MSVC
The copy_idb_pdb.cmake script would be executed for every configuration for all configurations. Debug would still want to get the RelWithDebInfo files, and the other way around.
This commit is contained in:
@@ -2754,7 +2754,7 @@ void cmLocalGenerator::CopyPchCompilePdb(
|
|||||||
bool stdPipesUTF8 = true;
|
bool stdPipesUTF8 = true;
|
||||||
|
|
||||||
auto configGenex = [&](cm::string_view expr) -> std::string {
|
auto configGenex = [&](cm::string_view expr) -> std::string {
|
||||||
if (this->GetGlobalGenerator()->IsVisualStudio()) {
|
if (this->GetGlobalGenerator()->IsMultiConfig()) {
|
||||||
return cmStrCat("$<$<CONFIG:", config, ">:", expr, ">");
|
return cmStrCat("$<$<CONFIG:", config, ">:", expr, ">");
|
||||||
}
|
}
|
||||||
return std::string(expr);
|
return std::string(expr);
|
||||||
@@ -2773,8 +2773,8 @@ void cmLocalGenerator::CopyPchCompilePdb(
|
|||||||
std::vector<std::string> no_byproducts;
|
std::vector<std::string> no_byproducts;
|
||||||
|
|
||||||
std::vector<std::string> outputs;
|
std::vector<std::string> outputs;
|
||||||
outputs.push_back(
|
outputs.push_back(configGenex(
|
||||||
cmStrCat(target_compile_pdb_dir, pdb_prefix, ReuseFrom, ".pdb"));
|
cmStrCat(target_compile_pdb_dir, pdb_prefix, ReuseFrom, ".pdb")));
|
||||||
|
|
||||||
if (this->GetGlobalGenerator()->IsVisualStudio()) {
|
if (this->GetGlobalGenerator()->IsVisualStudio()) {
|
||||||
this->AddCustomCommandToTarget(
|
this->AddCustomCommandToTarget(
|
||||||
|
|||||||
Reference in New Issue
Block a user