BUG: Fix executing and help
This commit is contained in:
parent
0b196d1aef
commit
7e3310e6e5
|
@ -306,8 +306,10 @@ int main (int argc, char *argv[])
|
|||
{
|
||||
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
|
||||
"CPack generator not specified" << std::endl);
|
||||
return 1;
|
||||
parsed = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<std::string> generatorsVector;
|
||||
cmSystemTools::ExpandListArgument(genList,
|
||||
generatorsVector);
|
||||
|
@ -370,41 +372,6 @@ int main (int argc, char *argv[])
|
|||
<< std::endl);
|
||||
parsed = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !parsed || help )
|
||||
{
|
||||
doc.CheckOptions(argc, argv);
|
||||
// Construct and print requested documentation.
|
||||
doc.SetName("cpack");
|
||||
doc.SetNameSection(cmDocumentationName);
|
||||
doc.SetUsageSection(cmDocumentationUsage);
|
||||
doc.SetDescriptionSection(cmDocumentationDescription);
|
||||
doc.SetOptionsSection(cmDocumentationOptions);
|
||||
|
||||
std::vector<cmDocumentationEntry> v;
|
||||
cmCPackGenerators::DescriptionsMap::const_iterator generatorIt;
|
||||
for( generatorIt = generators.GetGeneratorsList().begin();
|
||||
generatorIt != generators.GetGeneratorsList().end();
|
||||
++ generatorIt )
|
||||
{
|
||||
cmDocumentationEntry e;
|
||||
e.name = generatorIt->first.c_str();
|
||||
e.brief = generatorIt->second.c_str();
|
||||
e.full = "";
|
||||
v.push_back(e);
|
||||
}
|
||||
cmDocumentationEntry empty = {0,0,0};
|
||||
v.push_back(empty);
|
||||
doc.SetGeneratorsSection(&v[0]);
|
||||
|
||||
doc.SetSeeAlsoList(cmDocumentationSeeAlso);
|
||||
#undef cout
|
||||
return doc.PrintRequestedDocumentation(std::cout)? 0:1;
|
||||
#define cout no_cout_use_cmCPack_Log
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
std::string comspec = "cmw9xcom.exe";
|
||||
cmSystemTools::SetWindows9xComspecSubstitute(comspec.c_str());
|
||||
|
@ -440,6 +407,42 @@ int main (int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !parsed || help )
|
||||
{
|
||||
doc.CheckOptions(argc, argv);
|
||||
// Construct and print requested documentation.
|
||||
doc.SetName("cpack");
|
||||
doc.SetNameSection(cmDocumentationName);
|
||||
doc.SetUsageSection(cmDocumentationUsage);
|
||||
doc.SetDescriptionSection(cmDocumentationDescription);
|
||||
doc.SetOptionsSection(cmDocumentationOptions);
|
||||
|
||||
std::vector<cmDocumentationEntry> v;
|
||||
cmCPackGenerators::DescriptionsMap::const_iterator generatorIt;
|
||||
for( generatorIt = generators.GetGeneratorsList().begin();
|
||||
generatorIt != generators.GetGeneratorsList().end();
|
||||
++ generatorIt )
|
||||
{
|
||||
cmDocumentationEntry e;
|
||||
e.name = generatorIt->first.c_str();
|
||||
e.brief = generatorIt->second.c_str();
|
||||
e.full = "";
|
||||
v.push_back(e);
|
||||
}
|
||||
cmDocumentationEntry empty = {0,0,0};
|
||||
v.push_back(empty);
|
||||
doc.SetGeneratorsSection(&v[0]);
|
||||
|
||||
doc.SetSeeAlsoList(cmDocumentationSeeAlso);
|
||||
#undef cout
|
||||
return doc.PrintRequestedDocumentation(std::cout)? 0:1;
|
||||
#define cout no_cout_use_cmCPack_Log
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue