summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2007-02-27 15:10:10 (GMT)
committerKen Martin <ken.martin@kitware.com>2007-02-27 15:10:10 (GMT)
commit31a700188b6864341fdcbd22cd4181dbe6ace671 (patch)
treed1fafeb509092de727a1b977ffb9071ea1d966a8 /Source/cmakemain.cxx
parentfa9f03779f5cbfcd6ee264fcf6989e571779a156 (diff)
downloadCMake-31a700188b6864341fdcbd22cd4181dbe6ace671.zip
CMake-31a700188b6864341fdcbd22cd4181dbe6ace671.tar.gz
CMake-31a700188b6864341fdcbd22cd4181dbe6ace671.tar.bz2
ENH: added --system-information option to CMake
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index d636559..fd9a6e1 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -83,6 +83,10 @@ static const cmDocumentationEntry cmDocumentationOptions[] =
{"--graphviz=[file]", "Generate graphviz of dependencies.",
"Generate a graphviz input file that will contain all the library and "
"executable dependencies in the project."},
+ {"--system-information [file]", "Dump information about this system.",
+ "Dump a wide range of information about the current system. If run "
+ "from the top of a binary tree for a CMake project it will dump "
+ "additional information such as the cache, log files etc."},
{"--debug-trycompile", "Do not delete the try compile directories..",
"Do not delete the files and directories created for try_compile calls. "
"This is useful in debugging failed try_compiles."},
@@ -206,6 +210,7 @@ int do_cmake(int ac, char** av)
#endif
bool wiz = false;
+ bool sysinfo = false;
bool command = false;
bool list_cached = false;
bool list_all_cached = false;
@@ -219,6 +224,10 @@ int do_cmake(int ac, char** av)
{
wiz = true;
}
+ else if(!command && strcmp(av[i], "--system-information") == 0)
+ {
+ sysinfo = true;
+ }
// if command has already been set, then
// do not eat the -E
else if (!command && strcmp(av[i], "-E") == 0)
@@ -277,6 +286,12 @@ int do_cmake(int ac, char** av)
cmakewizard wizard;
return wizard.RunWizard(args);
}
+ if (sysinfo)
+ {
+ cmake cm;
+ int ret = cm.GetSystemInformation(args);
+ return ret;
+ }
cmake cm;
cm.SetProgressCallback(updateProgress, 0);
cm.SetScriptMode(script_mode);