summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-11-21 13:47:37 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-11-21 13:47:37 (GMT)
commit94c828bd1fb56436dd4c35b39dc652260edc1405 (patch)
tree1e53bcb383efea3ea3c3e5b4755c1df8af380653
parent6156928549247c0d3ede3522aba18a1e93887e7d (diff)
downloadCMake-94c828bd1fb56436dd4c35b39dc652260edc1405.zip
CMake-94c828bd1fb56436dd4c35b39dc652260edc1405.tar.gz
CMake-94c828bd1fb56436dd4c35b39dc652260edc1405.tar.bz2
ENH: clean up command line arguments
-rw-r--r--Source/cmake.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 946cf16..0b82167 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -66,9 +66,10 @@ void cmake::Usage(const char* program)
{
std::cerr << "cmake version " << cmMakefile::GetMajorVersion()
<< "." << cmMakefile::GetMinorVersion() << "\n";
- std::cerr << "Usage: " << program << " srcdir \n"
+ std::cerr << "Usage: " << program << " srcdir [options]\n"
<< "Where cmake is run from the directory where you want the object files written\n";
- std::cerr << "[-GgeneratorName] (where generator name can be: ";
+ std::cerr << "Options are:\n";
+ std::cerr << "[-GgeneratorName] (where generator name can be one of these: ";
std::vector<std::string> names;
cmMakefileGenerator::GetRegisteredGenerators(names);
for(std::vector<std::string>::iterator i =names.begin();
@@ -76,6 +77,7 @@ void cmake::Usage(const char* program)
{
std::cerr << "\"" << i->c_str() << "\" ";
}
+ std::cerr << "\n-DVAR:TYPE=VALUE (create a cache file entry)\n";
std::cerr << ")\n";
}
@@ -169,6 +171,10 @@ void cmake::SetArgs(cmMakefile& builder, const std::vector<std::string>& args)
{
m_Verbose = true;
}
+ else if(arg.find("-D",0) == 0)
+ {
+ // skip for now
+ }
else if(arg.find("-G",0) == 0)
{
std::string value = arg.substr(2);
@@ -193,9 +199,9 @@ void cmake::SetArgs(cmMakefile& builder, const std::vector<std::string>& args)
builder.SetStartOutputDirectory
(cmSystemTools::GetCurrentWorkingDirectory().c_str());
builder.SetHomeDirectory
- (cmSystemTools::CollapseFullPath(args[1].c_str()).c_str());
+ (cmSystemTools::CollapseFullPath(arg.c_str()).c_str());
builder.SetStartDirectory
- (cmSystemTools::CollapseFullPath(args[1].c_str()).c_str());
+ (cmSystemTools::CollapseFullPath(arg.c_str()).c_str());
}
}
if(!directoriesSet)