summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-06-27 15:35:08 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-06-27 15:35:08 (GMT)
commitb5c6730f7095a5898510a4a3b287895f30ed9003 (patch)
tree9d4810eb251bb0414ffe6485be90b4ec1d56342e /Source/cmake.cxx
parentc19c252e23ece64d0533e450668d26c976251ce2 (diff)
downloadCMake-b5c6730f7095a5898510a4a3b287895f30ed9003.zip
CMake-b5c6730f7095a5898510a4a3b287895f30ed9003.tar.gz
CMake-b5c6730f7095a5898510a4a3b287895f30ed9003.tar.bz2
added help options
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index a267377..8f8cbf9 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -224,6 +224,20 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args)
int cmake::Generate(const std::vector<std::string>& args)
{
+ // look for obvious request for help
+ for(unsigned int i=1; i < args.size(); ++i)
+ {
+ std::string arg = args[i];
+ if(arg.find("-help",0) != std::string::npos ||
+ arg.find("--help",0) != std::string::npos ||
+ arg.find("/?",0) != std::string::npos ||
+ arg.find("-usage",0) != std::string::npos)
+ {
+ this->Usage(args[0].c_str());
+ return -1;
+ }
+ }
+
// Create a makefile
cmMakefile mf;