summaryrefslogtreecommitdiffstats
path: root/Source/cmakewizard.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-08-26 19:06:52 (GMT)
committerBrad King <brad.king@kitware.com>2003-08-26 19:06:52 (GMT)
commit41445f67aca14217f5e786b25ed5665b26d45ca8 (patch)
tree79a6e937f774a1bd2670430a3b14c0b2b58515d4 /Source/cmakewizard.cxx
parentc59cc5a542ca78cba2983d91b588ae1f7ee490dd (diff)
downloadCMake-41445f67aca14217f5e786b25ed5665b26d45ca8.zip
CMake-41445f67aca14217f5e786b25ed5665b26d45ca8.tar.gz
CMake-41445f67aca14217f5e786b25ed5665b26d45ca8.tar.bz2
BUG: Fixed crash of cmake -i when CMAKE_ROOT cannot be found. Made resulting error message cleaner.
Diffstat (limited to 'Source/cmakewizard.cxx')
-rw-r--r--Source/cmakewizard.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmakewizard.cxx b/Source/cmakewizard.cxx
index f31d54b..f1c4fab 100644
--- a/Source/cmakewizard.cxx
+++ b/Source/cmakewizard.cxx
@@ -89,7 +89,7 @@ void cmakewizard::ShowMessage(const char* m)
-void cmakewizard::RunWizard(std::vector<std::string> const& args)
+int cmakewizard::RunWizard(std::vector<std::string> const& args)
{
m_ShowAdvanced = this->AskAdvanced();
cmSystemTools::DisableRunCommandOutput();
@@ -148,6 +148,10 @@ void cmakewizard::RunWizard(std::vector<std::string> const& args)
cachem->SaveCache(make.GetHomeOutputDirectory());
}
while(asked);
- make.Generate();
- this->ShowMessage("CMake complete, run make to build project.\n");
+ if(make.Generate() == 0)
+ {
+ this->ShowMessage("CMake complete, run make to build project.\n");
+ return 0;
+ }
+ return 1;
}