[CMake] misleading error message in cmIncludeCommand.cxx
Alexander Neundorf
a.neundorf-work at gmx.net
Wed Jun 8 15:52:34 EDT 2005
Hi,
in current cvs cmIncludeCommand.cxx there is the code:
bool readit = m_Makefile->ReadListFile( m_Makefile->GetCurrentListFile(),
fname.c_str() );
f(!optional && !readit) {
std::string m = "Could not find include file: ";
m += fname;
this->SetError(m.c_str());
return false;
}
The problem is that cmMakefile.ReadListFile() doesn't only return false
if the file was not found, but also if any of the contained commands
failed:
// add this list file to the list of dependencies
m_ListFiles.push_back( filenametoread);
const size_t numberFunctions = lf->m_Functions.size();
for(size_t i =0; i < numberFunctions; ++i) {
this->ExecuteCommand(lf->m_Functions[i]);
if ( cmSystemTools::GetFatalErrorOccured() ) {
return false;
}
}
So I started checking why cmake couldn't read the included file, until I
looked at the sources and found out that it failed because one of the
commands in the included file failed.
It would be nice if cmake could give a better error message.
Bye
Alex
--
Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++
More information about the CMake
mailing list