diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index 48bede4e8..0e43736de 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -35,6 +35,11 @@ bool cmIncludeDirectoryCommand::InitialPass(std::vector const& args for(; i != args.end(); ++i) { + if ( *i == "NOTFOUND" ) + { + this->SetError("CMake attempted to put directory that was not found to the list of include directories."); + return false; + } m_Makefile->AddIncludeDirectory((*i).c_str(), before); } return true; diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx index d45f24667..c2eade7c3 100644 --- a/Source/cmLinkLibrariesCommand.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -28,6 +28,11 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector const& args) for(std::vector::const_iterator i = args.begin(); i != args.end(); ++i) { + if ( *i == "NOTFOUND" ) + { + this->SetError("CMake attempted to put directory that was not found to the list of include directories."); + return false; + } if (*i == "debug") { ++i; diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 70ba944a0..ab3663a0f 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -36,6 +36,12 @@ bool cmTargetLinkLibrariesCommand::InitialPass(std::vector const& a for(++i; i != args.end(); ++i) { + if ( *i == "NOTFOUND" ) + { + this->SetError("CMake attempted to put library that was not found to the list of libraries."); + return false; + } + if (*i == "debug") { ++i;