BUG: Fix storage/use of argc/argv in CMakeSetup dialog.
This commit is contained in:
parent
be019c96d4
commit
a8d199df49
|
@ -26,6 +26,7 @@ CMakeCommandLineInfo::CMakeCommandLineInfo()
|
|||
char fname[4096];
|
||||
::GetModuleFileName(0, fname, 4096);
|
||||
m_Argv0 = fname;
|
||||
m_Argv.push_back(m_Argv0.c_str());
|
||||
}
|
||||
|
||||
CMakeCommandLineInfo::~CMakeCommandLineInfo()
|
||||
|
|
|
@ -102,9 +102,12 @@ BOOL CMakeSetup::InitInstance()
|
|||
CMakeCommandLineInfo cmdInfo;
|
||||
ParseCommandLine(cmdInfo);
|
||||
|
||||
// Check for documentation options.
|
||||
// Check for documentation options. If there are no arguments skip
|
||||
// the check because the GUI should be displayed instead of showing
|
||||
// usage in this case.
|
||||
cmDocumentation doc;
|
||||
if(doc.CheckOptions(cmdInfo.GetArgC(), cmdInfo.GetArgV()))
|
||||
if(cmdInfo.GetArgC() > 1 &&
|
||||
doc.CheckOptions(cmdInfo.GetArgC(), cmdInfo.GetArgV()))
|
||||
{
|
||||
// Construct and print requested documentation.
|
||||
cmake hcm;
|
||||
|
|
Loading…
Reference in New Issue