diff options
author | Brad King <brad.king@kitware.com> | 2020-01-20 16:59:19 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-01-20 16:59:28 (GMT) |
commit | 941c09616bc214db77e3b1b7e5229517db08b45c (patch) | |
tree | f8fb0dcf54d2b15406f87d2ea648d97981d4c09a /Source/cmGeneratorTarget.cxx | |
parent | 56a3e84a67bebd645914a65eea825aab365f88c7 (diff) | |
parent | a55df20499fe9329269efccc8552f26029ae4a0e (diff) | |
download | CMake-941c09616bc214db77e3b1b7e5229517db08b45c.zip CMake-941c09616bc214db77e3b1b7e5229517db08b45c.tar.gz CMake-941c09616bc214db77e3b1b7e5229517db08b45c.tar.bz2 |
Merge topic 'multi-ninja-pch'
a55df20499 Multi-Ninja: Add precompile headers support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4201
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 441515c..792cd4d 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3407,8 +3407,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) { |