[cmake-commits] andy committed cmIncludeDirectoryCommand.cxx 1.23 1.24

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Feb 23 09:45:08 EST 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv32461/Source

Modified Files:
	cmIncludeDirectoryCommand.cxx 
Log Message:
BUG: Produce error when include directories is invoked with an empty list


Index: cmIncludeDirectoryCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmIncludeDirectoryCommand.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- cmIncludeDirectoryCommand.cxx	5 Oct 2006 12:55:59 -0000	1.23
+++ cmIncludeDirectoryCommand.cxx	23 Feb 2007 14:45:04 -0000	1.24
@@ -50,8 +50,19 @@
       }
     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()))



More information about the Cmake-commits mailing list