Browse Source

ENH: add a check for empty include directories

Bill Hoffman 21 years ago
parent
commit
692f18538b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Source/cmIncludeDirectoryCommand.cxx

+ 4 - 0
Source/cmIncludeDirectoryCommand.cxx

@@ -35,6 +35,10 @@ bool cmIncludeDirectoryCommand::InitialPass(std::vector<std::string> const& args
 
   for(; i != args.end(); ++i)
     {
+    if(i->size() == 0)
+      {
+      cmSystemTools::Error("Empty Include Directory Passed into INCLUDE_DIRECTORIES command.");
+      }
     m_Makefile->AddIncludeDirectory((*i).c_str(), before);
     }
   return true;