Browse Source

Add some error checking for missing include directories and link libraries

Andy Cedilnik 23 years ago
parent
commit
6b228ff924

+ 5 - 0
Source/cmIncludeDirectoryCommand.cxx

@@ -35,6 +35,11 @@ bool cmIncludeDirectoryCommand::InitialPass(std::vector<std::string> 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;

+ 5 - 0
Source/cmLinkLibrariesCommand.cxx

@@ -28,6 +28,11 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args)
   for(std::vector<std::string>::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;

+ 6 - 0
Source/cmTargetLinkLibrariesCommand.cxx

@@ -36,6 +36,12 @@ bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string> 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;