ENH: Allow running without config file

This commit is contained in:
Andy Cedilnik 2006-02-23 09:59:42 -05:00
parent 01a55559dd
commit 2e19553e7c
1 changed files with 6 additions and 3 deletions

View File

@ -234,11 +234,14 @@ int main (int argc, char *argv[])
if ( parsed && !help ) if ( parsed && !help )
{ {
if ( cmSystemTools::FileExists(cpackConfigFile.c_str()) && !mf->ReadListFile(0, cpackConfigFile.c_str()) ) if ( cmSystemTools::FileExists(cpackConfigFile.c_str()) )
{
if ( !mf->ReadListFile(0, cpackConfigFile.c_str()) )
{ {
cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "Problem reding CPack config file: \"" << cpackConfigFile.c_str() << "\"" << std::endl); cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "Problem reding CPack config file: \"" << cpackConfigFile.c_str() << "\"" << std::endl);
return 1; return 1;
} }
}
else if ( cpackConfigFileSpecified ) else if ( cpackConfigFileSpecified )
{ {
cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "Cannot find CPack config file: \"" << cpackConfigFile.c_str() << "\"" << std::endl); cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "Cannot find CPack config file: \"" << cpackConfigFile.c_str() << "\"" << std::endl);