diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index 48bede4e8..63fc08cfa 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -35,6 +35,10 @@ bool cmIncludeDirectoryCommand::InitialPass(std::vector 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;