Merge topic 'ninja-fix-crash-on-error'

9a13fcbf Ninja: Do not crash when CMAKE_<LANG>_COMPILE_OBJECT is empty (#15325)
This commit is contained in:
Brad King 2014-12-23 08:53:59 -05:00 committed by CMake Topic Stage
commit 90b015a0ba
1 changed files with 4 additions and 1 deletions

View File

@ -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)