diff options
author | Brad King <brad.king@kitware.com> | 2014-12-23 13:53:59 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-12-23 13:53:59 (GMT) |
commit | 90b015a0bacdbc066670becf0e16843c104cce8c (patch) | |
tree | 90c468befad12b127b962896b29b6aa2c94f559d /Source/cmNinjaTargetGenerator.cxx | |
parent | 23e9bc55f38665adab6406980edfaa26f5b14d88 (diff) | |
parent | 9a13fcbf02e16bda1b8d30332c97ea9460306e4d (diff) | |
download | CMake-90b015a0bacdbc066670becf0e16843c104cce8c.zip CMake-90b015a0bacdbc066670becf0e16843c104cce8c.tar.gz CMake-90b015a0bacdbc066670becf0e16843c104cce8c.tar.bz2 |
Merge topic 'ninja-fix-crash-on-error'
9a13fcbf Ninja: Do not crash when CMAKE_<LANG>_COMPILE_OBJECT is empty (#15325)
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 7967762..b36ff93 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -454,7 +454,10 @@ cmNinjaTargetGenerator std::vector<std::string> compileCmds; cmSystemTools::ExpandListArgument(compileCmd, compileCmds); - compileCmds.front().insert(0, cldeps); + if (!compileCmds.empty()) + { + compileCmds.front().insert(0, cldeps); + } for (std::vector<std::string>::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) |