summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-07-25 22:30:27 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-07-25 22:30:27 (GMT)
commita5eac44d1833c80ce82dad9331418f1119582f3b (patch)
treeb42d695d47580684a1b8a92785d5870921bb6273 /Source/cmake.cxx
parent4ab2650802f7b0addce7860aff4fd5a2709eae24 (diff)
downloadCMake-a5eac44d1833c80ce82dad9331418f1119582f3b.zip
CMake-a5eac44d1833c80ce82dad9331418f1119582f3b.tar.gz
CMake-a5eac44d1833c80ce82dad9331418f1119582f3b.tar.bz2
ENH: rework GUI with configure/OK/Cancel
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx22
1 files changed, 20 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 9bab508..6b6673b 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -222,7 +222,7 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args)
"Path to CMake installation.", cmCacheManager::INTERNAL);
}
-int cmake::Generate(const std::vector<std::string>& args)
+int cmake::Generate(const std::vector<std::string>& args, bool buildMakefiles)
{
if(args.size() == 1 && !cmSystemTools::FileExists("CMakeLists.txt"))
{
@@ -279,7 +279,25 @@ int cmake::Generate(const std::vector<std::string>& args)
this->Usage(args[0].c_str());
return -1;
}
- mf.GenerateMakefile();
+ // if buildMakefiles, then call GenerateMakefile
+ if(buildMakefiles)
+ {
+ mf.GenerateMakefile();
+ }
+ else // do not build, but let the commands finalize
+ {
+ std::vector<cmMakefile*> makefiles;
+ mf.FindSubDirectoryCMakeListsFiles(makefiles);
+ for(std::vector<cmMakefile*>::iterator i = makefiles.begin();
+ i != makefiles.end(); ++i)
+ {
+ cmMakefile* mf = *i;
+ mf->FinalPass();
+ delete mf;
+ }
+ mf.FinalPass();
+ }
+
// Before saving the cache
// if the project did not define one of the entries below, add them now