From 6b228ff924ee2dc7964b4885f38b0d3f5b4fc7d3 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Thu, 30 Jan 2003 14:34:40 -0500 Subject: [PATCH] Add some error checking for missing include directories and link libraries --- Source/cmIncludeDirectoryCommand.cxx | 5 +++++ Source/cmLinkLibrariesCommand.cxx | 5 +++++ Source/cmTargetLinkLibrariesCommand.cxx | 6 ++++++ 3 files changed, 16 insertions(+) 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;