summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-04-03 03:48:12 (GMT)
committerBrad King <brad.king@kitware.com>2003-04-03 03:48:12 (GMT)
commita5ea72df8856aada1ac9cd9916466a078a6ff9d3 (patch)
treed1a36bdb4356124b2ffd6701a4bc160f25bb2c1f /Source/cmake.cxx
parent3bba5f587e719bed322e2d9aeca57283907b7ef9 (diff)
downloadCMake-a5ea72df8856aada1ac9cd9916466a078a6ff9d3.zip
CMake-a5ea72df8856aada1ac9cd9916466a078a6ff9d3.tar.gz
CMake-a5ea72df8856aada1ac9cd9916466a078a6ff9d3.tar.bz2
ENH: Improved documentation. Also modified behavior of "cmake" to not configure a project in the current directory unless . is given.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx26
1 files changed, 3 insertions, 23 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index cd0ab2f..a12ab83 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -898,27 +898,6 @@ bool cmake::CacheVersionMatches()
// handle a command line invocation
int cmake::Run(const std::vector<std::string>& args)
{
- // a quick check for args
- if(args.size() == 1 && !cmSystemTools::FileExists("CMakeLists.txt"))
- {
- this->Usage(args[0].c_str());
- return -1;
- }
-
- // 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;
- }
- }
-
// Process the arguments
this->SetArgs(args);
@@ -927,8 +906,9 @@ int cmake::Run(const std::vector<std::string>& args)
srcList += "/CMakeLists.txt";
if(!cmSystemTools::FileExists(srcList.c_str()))
{
- cmSystemTools::Error("The source directory does not appear to contain CMakeLists.txt\n");
- this->Usage(args[0].c_str());
+ cmSystemTools::Error(
+ "The source directory does not appear to contain CMakeLists.txt.\n"
+ "Specify --help for usage.");
return -1;
}