diff options
author | Brad King <brad.king@kitware.com> | 2021-03-30 13:50:43 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-03-30 13:50:48 (GMT) |
commit | efcdec9a19d38e9cc1d3070d68e859cda4296ec1 (patch) | |
tree | fe8e550586626cfb05bc81bfd0d9fa6ec235769c /Source/cmLocalNinjaGenerator.cxx | |
parent | 2e7719903032f4a7a9e223e1cd65e2c5132636ce (diff) | |
parent | 6dd89529e82cbc9650aff204fe063882ae19043b (diff) | |
download | CMake-efcdec9a19d38e9cc1d3070d68e859cda4296ec1.zip CMake-efcdec9a19d38e9cc1d3070d68e859cda4296ec1.tar.gz CMake-efcdec9a19d38e9cc1d3070d68e859cda4296ec1.tar.bz2 |
Merge topic 'nmc-cc-no-output'
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/cmLocalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index f2575c9..03d1697 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -585,6 +585,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 |