summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-07-08 02:44:18 (GMT)
committerBrad King <brad.king@kitware.com>2003-07-08 02:44:18 (GMT)
commit1cecf7b5aaa4a74a1a2a4545a9effda7cdc61879 (patch)
treeaaf5f7056b1e8554dcc0006e64fabb95be0faae5 /Source/cmakemain.cxx
parentb85f000e26fd7d00fee2073581f2c2ce8098fa2d (diff)
downloadCMake-1cecf7b5aaa4a74a1a2a4545a9effda7cdc61879.zip
CMake-1cecf7b5aaa4a74a1a2a4545a9effda7cdc61879.tar.gz
CMake-1cecf7b5aaa4a74a1a2a4545a9effda7cdc61879.tar.bz2
ENH: Added support to write multiple help options with one command line. Output files can now also be specified for the help options.
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 0d35894..784502a 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -93,7 +93,7 @@ int main(int ac, char** av)
int do_cmake(int ac, char** av)
{
cmDocumentation doc;
- if(cmDocumentation::Type ht = doc.CheckOptions(ac, av))
+ if(doc.CheckOptions(ac, av))
{
// Construct and print requested documentation.
cmake hcm;
@@ -107,8 +107,8 @@ int do_cmake(int ac, char** av)
doc.SetGeneratorsSection(&generators[0]);
doc.SetOptionsSection(cmDocumentationOptions);
doc.SetCommandsSection(&commands[0]);
- doc.PrintDocumentation(ht, std::cout);
-
+ int result = doc.PrintRequestedDocumentation(std::cout)? 0:1;
+
// If we were run with no arguments, but a CMakeLists.txt file
// exists, the user may have been trying to use the old behavior
// of cmake to build a project in-source. Print a message
@@ -121,7 +121,7 @@ int do_cmake(int ac, char** av)
doc.Print(cmDocumentation::UsageForm, std::cerr);
return 1;
}
- return 0;
+ return result;
}
bool wiz = false;