From b5c6730f7095a5898510a4a3b287895f30ed9003 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Wed, 27 Jun 2001 11:35:08 -0400 Subject: [PATCH] added help options --- Source/cmake.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index a267377af..8f8cbf90e 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -224,6 +224,20 @@ void cmake::AddCMakePaths(const std::vector& args) int cmake::Generate(const std::vector& 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;