BUG: better error handling

This commit is contained in:
Ken Martin 2005-02-22 10:42:49 -05:00
parent 39af9ee1e4
commit 4baa085a1a
1 changed files with 13 additions and 0 deletions

View File

@ -1806,6 +1806,19 @@ int cmCTest::RunCMakeAndTest(std::string* outstring)
double timeout = m_TimeOut; double timeout = m_TimeOut;
int retVal = 0; int retVal = 0;
// if the generator and make program are not specified then it is an error
if (!m_BuildGenerator.size() || !m_BuildMakeProgram.size())
{
if(outstring)
{
*outstring =
"--build-and-test requires that both the generator and makeprogram "
"be provided using the --build-generator and --build-makeprogram "
"command line options. ";
}
return 1;
}
// default to the build type of ctest itself // default to the build type of ctest itself
if(m_ConfigType.size() == 0) if(m_ConfigType.size() == 0)
{ {