Browse Source

Reformatted the error printed by cmMakefile.

Berk Geveci 23 years ago
parent
commit
d0d25bb989
2 changed files with 8 additions and 5 deletions
  1. 1 1
      Source/cmIncludeCommand.cxx
  2. 7 4
      Source/cmMakefile.cxx

+ 1 - 1
Source/cmIncludeCommand.cxx

@@ -35,7 +35,7 @@ bool cmIncludeCommand::InitialPass(std::vector<std::string> const& args)
                                           args[0].c_str());
   if(!optional && !readit)
     {
-    std::string m = "Could not find include file:";
+    std::string m = "Could not find include file: ";
     m += args[0];
     this->SetError(m.c_str());
     return false;

+ 7 - 4
Source/cmMakefile.cxx

@@ -224,10 +224,13 @@ void cmMakefile::ExecuteCommand(std::string &name,
           }
         if(!usedCommand->InitialPass(expandedArguments))
           {
-          cmSystemTools::Error(usedCommand->GetName(),
-                               ": Error : \n",
-                               usedCommand->GetError(),
-                               m_cmCurrentDirectory.c_str());
+	  std::string error;
+	  error = usedCommand->GetName();
+	  error += ": Error : \n";
+	  error += usedCommand->GetError();
+	  error += " from CMakeLists.txt file in directory: ";
+	  error += m_cmCurrentDirectory;
+          cmSystemTools::Error(error.c_str());
           }
         else
           {