summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2021-03-25 17:18:47 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2021-03-25 17:18:47 (GMT)
commit3b864b2583d977898638336f5a096ff33955bd7a (patch)
tree52715da1da8654012b8c995416b4b5f543fb8ed0 /Source/cmLocalNinjaGenerator.cxx
parentfef28dbc1e252f5431f3602129a3b3a6cc0ab7bf (diff)
downloadCMake-3b864b2583d977898638336f5a096ff33955bd7a.zip
CMake-3b864b2583d977898638336f5a096ff33955bd7a.tar.gz
CMake-3b864b2583d977898638336f5a096ff33955bd7a.tar.bz2
Ninja Multi-Config: Include configs in long CC scripts
Fixes: #21973
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 8ed411a..a1b350d 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -651,6 +651,12 @@ void cmLocalNinjaGenerator::WriteCustomCommandBuildStatement(
gg->WriteBuild(this->GetImplFileStream(fileConfig), build);
} else {
std::string customStep = cmSystemTools::GetFilenameName(ninjaOutputs[0]);
+ if (this->GlobalGenerator->IsMultiConfig()) {
+ customStep += '-';
+ customStep += fileConfig;
+ customStep += '-';
+ customStep += ccg.GetOutputConfig();
+ }
// Hash full path to make unique.
customStep += '-';
cmCryptoHash hash(cmCryptoHash::AlgoSHA256);