summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index bcb67a1..aca7ab6 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1347,7 +1347,14 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
// In script mode we terminate after running the script.
if(m_ScriptMode)
{
- return 0;
+ if(cmSystemTools::GetErrorOccuredFlag())
+ {
+ return -1;
+ }
+ else
+ {
+ return 0;
+ }
}
this->PreLoadCMakeFiles();