diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2020-01-10 16:05:27 (GMT) |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2020-01-17 22:17:35 (GMT) |
commit | a55df20499fe9329269efccc8552f26029ae4a0e (patch) | |
tree | 7496ccc84d7be98249c45ae4ea6309d5b8b2dc85 /Source/cmGeneratorTarget.cxx | |
parent | 1e728706de1457a25fe531d5905c28570a208a08 (diff) | |
download | CMake-a55df20499fe9329269efccc8552f26029ae4a0e.zip CMake-a55df20499fe9329269efccc8552f26029ae4a0e.tar.gz CMake-a55df20499fe9329269efccc8552f26029ae4a0e.tar.bz2 |
Multi-Ninja: Add precompile headers support
Fixes: #19789
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index b3fb132..6aadcf3 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3396,8 +3396,15 @@ std::string cmGeneratorTarget::GetPchHeader(const std::string& config, { "OBJCXX", ".objcxx.hxx" } }; - filename = cmStrCat(filename, "CMakeFiles/", generatorTarget->GetName(), - ".dir/cmake_pch", languageToExtension.at(language)); + filename = + cmStrCat(filename, "CMakeFiles/", generatorTarget->GetName(), ".dir"); + + if (this->GetGlobalGenerator()->IsMultiConfig()) { + filename = cmStrCat(filename, "/", config); + } + + filename = + cmStrCat(filename, "/cmake_pch", languageToExtension.at(language)); const std::string filename_tmp = cmStrCat(filename, ".tmp"); if (!pchReuseFrom) { |