summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2007-02-23 14:45:04 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2007-02-23 14:45:04 (GMT)
commit440bbf08711e9a784f90f1d2541e5d204807161a (patch)
tree090fa281b93318b84c984d0f11fb300dec30d2de
parent48202ef62395e6e29fed1ab74a939536695d9f64 (diff)
downloadCMake-440bbf08711e9a784f90f1d2541e5d204807161a.zip
CMake-440bbf08711e9a784f90f1d2541e5d204807161a.tar.gz
CMake-440bbf08711e9a784f90f1d2541e5d204807161a.tar.bz2
BUG: Produce error when include directories is invoked with an empty list
-rw-r--r--Source/cmIncludeDirectoryCommand.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx
index a34b116..cf55f29 100644
--- a/Source/cmIncludeDirectoryCommand.cxx
+++ b/Source/cmIncludeDirectoryCommand.cxx
@@ -50,8 +50,19 @@ bool cmIncludeDirectoryCommand
}
if(i->size() == 0)
{
- cmSystemTools::Error
- ("Empty Include Directory Passed into INCLUDE_DIRECTORIES command.");
+ const char* versionValue =
+ this->Makefile->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
+ const char* errorMessage
+ = "Empty Include Directory Passed into INCLUDE_DIRECTORIES command.";
+ if(atof(versionValue) < 2.5)
+ {
+ cmSystemTools::Error(errorMessage);
+ }
+ else
+ {
+ this->SetError(errorMessage);
+ return 0;
+ }
}
std::string unixPath = *i;
if (!cmSystemTools::IsOff(unixPath.c_str()))