Преглед изворни кода

ENH: Report an error if the target does not exists

Andy Cedilnik пре 20 година
родитељ
комит
5966baeec3
1 измењених фајлова са 7 додато и 1 уклоњено
  1. 7 1
      Source/cmInstallTargetsCommand.cxx

+ 7 - 1
Source/cmInstallTargetsCommand.cxx

@@ -47,8 +47,14 @@ bool cmInstallTargetsCommand::InitialPass(std::vector<std::string> const& args)
       tgts[*s].SetInstallPath(args[0].c_str());
       tgts[*s].SetRuntimeInstallPath(runtime_dir.c_str());
       }
+    else
+      {
+      std::string str = "Cannot find target: \"" + *s + "\" to install.";
+      this->SetError(str.c_str());
+      return false;
+      }
     }
-  
+
   return true;
 }