BUG: Fix include_directories command to produce an immediately whether or not 2.4 compatibility is enabled. CMake 2.4 already produced an error, just not immediately.

This commit is contained in:
Brad King 2008-03-08 09:50:56 -05:00
parent 959bd61e37
commit bf732ec464
1 changed files with 2 additions and 11 deletions

View File

@ -50,18 +50,9 @@ bool cmIncludeDirectoryCommand
}
if(i->size() == 0)
{
const char* errorMessage
= "Empty Include Directory Passed into INCLUDE_DIRECTORIES command.";
if(this->Makefile->NeedBackwardsCompatibility(2,4))
{
cmSystemTools::Error(errorMessage);
}
else
{
this->SetError(errorMessage);
this->SetError("given empty-string as include directory.");
return false;
}
}
this->AddDirectory(i->c_str(),before,system);