diff options
author | Brad King <brad.king@kitware.com> | 2007-11-19 18:42:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-11-19 18:42:54 (GMT) |
commit | ecf24b1671041d4243270fd1ec151eac8f9575aa (patch) | |
tree | c4a37aa2ff0671bbb6815cd8ee4246489c8f8695 /Source/cmakemain.cxx | |
parent | 9b0df0d6922810da15431fef507bf82fdd8d94a4 (diff) | |
download | CMake-ecf24b1671041d4243270fd1ec151eac8f9575aa.zip CMake-ecf24b1671041d4243270fd1ec151eac8f9575aa.tar.gz CMake-ecf24b1671041d4243270fd1ec151eac8f9575aa.tar.bz2 |
BUG: Always return positive integers to the OS on error. Windows error encoding is confused by negative return values.
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 9e81a42..8d38f70 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -487,6 +487,16 @@ int do_cmake(int ac, char** av) } } } - return res; + + // Always return a non-negative value. Windows tools do not always + // interpret negative return values as errors. + if(res != 0) + { + return 1; + } + else + { + return 0; + } } |