summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-03-30 13:50:43 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-03-30 13:50:48 (GMT)
commit1df75b171d65ea6679729ab52d1ca2a588a5eef8 (patch)
treec4cbb7da7c503cace0a945ae88349e8689d40588 /Source
parentd212d91f14d2f2ed4f77ea7f190bbea2a4f6e302 (diff)
parent6dd89529e82cbc9650aff204fe063882ae19043b (diff)
downloadCMake-1df75b171d65ea6679729ab52d1ca2a588a5eef8.zip
CMake-1df75b171d65ea6679729ab52d1ca2a588a5eef8.tar.gz
CMake-1df75b171d65ea6679729ab52d1ca2a588a5eef8.tar.bz2
Merge topic 'nmc-cc-no-output' into release-3.20
6dd89529e8 Ninja Multi-Config: Fix crash on custom command config with no output e21a80e97d Tests: Teach RunCMake to ignore incidental 'Recompacting log' ninja output Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !5950
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index a1b350d..51ad993 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -582,6 +582,11 @@ void cmLocalNinjaGenerator::WriteCustomCommandBuildStatement(
auto ccgs = this->MakeCustomCommandGenerators(*cc, fileConfig);
for (cmCustomCommandGenerator const& ccg : ccgs) {
+ if (ccg.GetOutputs().empty() && ccg.GetByproducts().empty()) {
+ // Generator expressions evaluate to no output for this config.
+ continue;
+ }
+
cmNinjaDeps orderOnlyDeps;
// A custom command may appear on multiple targets. However, some build