summaryrefslogtreecommitdiffstats
path: root/Source/cmcldeps.cxx
diff options
context:
space:
mode:
authorPeter Kümmel <syntheticpp@gmx.net>2012-07-15 12:47:02 (GMT)
committerPeter Kümmel <syntheticpp@gmx.net>2012-07-15 16:23:04 (GMT)
commit84a18cb5d659602235cc995497f5fb016560d553 (patch)
tree1ee663f7c1a10cc574b6b58e282426a23b481909 /Source/cmcldeps.cxx
parent42592966c514015cef070d6b24a0c29f22ac2999 (diff)
downloadCMake-84a18cb5d659602235cc995497f5fb016560d553.zip
CMake-84a18cb5d659602235cc995497f5fb016560d553.tar.gz
CMake-84a18cb5d659602235cc995497f5fb016560d553.tar.bz2
Ninja: also stop when .rc's .d file couldn't be generated
prevents silent disappearing of .d files for resource files. cmcldeps changes directory for cl call, so relativ include paths do not work.
Diffstat (limited to 'Source/cmcldeps.cxx')
-rw-r--r--Source/cmcldeps.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx
index ce64132..f04ff87 100644
--- a/Source/cmcldeps.cxx
+++ b/Source/cmcldeps.cxx
@@ -206,7 +206,7 @@ static int process( const std::string& srcfilename,
includes.push_back(inc);
} else {
if (!isFirstLine || !startsWith(line, srcfilename)) {
- if (!quiet) {
+ if (!quiet || exit_code != 0) {
fprintf(stdout, "%s\n", line.c_str());
}
} else {
@@ -267,8 +267,11 @@ int main() {
}
// extract dependencies with cl.exe
- process(srcfilename, dfile, objfile,
- prefix, cl + nol + show + clrest, objdir, true);
+ int exit_code = process(srcfilename, dfile, objfile,
+ prefix, cl + nol + show + clrest, objdir, true);
+
+ if (exit_code != 0)
+ return exit_code;
// compile rc file with rc.exe
return process(srcfilename, "" , objfile, prefix, binpath + " " + rest);