summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmNinjaTargetGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 816e6d8..b8cc5fb 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)