summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-06-03 17:08:52 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-06-03 17:08:52 (GMT)
commit350f09ae6d267806051873027d47af64dab81547 (patch)
treec95550ea1645b93a2445989855d2be22da11e0de /Source/cmakemain.cxx
parent5a286f1c90d7dc04188bd3b2f0aa0b9320462f89 (diff)
downloadCMake-350f09ae6d267806051873027d47af64dab81547.zip
CMake-350f09ae6d267806051873027d47af64dab81547.tar.gz
CMake-350f09ae6d267806051873027d47af64dab81547.tar.bz2
removed ccommand use cmake now
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx30
1 files changed, 22 insertions, 8 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 710284d..e08e19f 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -21,6 +21,7 @@
int main(int ac, char** av)
{
bool wiz = false;
+ bool command = false;
std::vector<std::string> args;
for(int i =0; i < ac; ++i)
{
@@ -30,18 +31,31 @@ int main(int ac, char** av)
}
else
{
- args.push_back(av[i]);
+ if (strcmp(av[i], "-E") == 0)
+ {
+ command = true;
+ }
+ else
+ {
+ args.push_back(av[i]);
+ }
}
}
- if(!wiz)
+
+ if(command)
{
- cmake cm;
- int ret = cm.Generate(args);
- cmMakefileGenerator::UnRegisterGenerators();
+ int ret = cmake::CMakeCommand(args);
return ret;
}
- cmakewizard wizard;
- wizard.RunWizard(args);
+ if (wiz)
+ {
+ cmakewizard wizard;
+ wizard.RunWizard(args);
+ cmMakefileGenerator::UnRegisterGenerators();
+ return 0;
+ }
+ cmake cm;
+ int ret = cm.Generate(args);
cmMakefileGenerator::UnRegisterGenerators();
- return 0;
+ return ret;
}