Răsfoiți Sursa

add_custom_command: Format files in error message in a single line

Daniel Eiband 6 ani în urmă
părinte
comite
fd3a394614

+ 2 - 2
Source/cmAddCustomCommandCommand.cxx

@@ -320,8 +320,8 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
 
     // No command for this output exists.
     status.SetError(
-      cmStrCat("given APPEND option with output\n\"", output[0],
-               "\"\nwhich is not already a custom command output."));
+      cmStrCat("given APPEND option with output\n  ", output[0],
+               "\nwhich is not already a custom command output."));
     return false;
   }
 

+ 2 - 2
Source/cmCheckCustomOutputs.cxx

@@ -17,8 +17,8 @@ bool cmCheckCustomOutputs(const std::vector<std::string>& outputs,
     // directory during an out of source build.
     if (!mf.CanIWriteThisFile(o)) {
       status.SetError(
-        cmStrCat("attempted to have a file\n\"", o,
-                 "\"\nin a source directory as an output of custom command."));
+        cmStrCat("attempted to have a file\n  ", o,
+                 "\nin a source directory as an output of custom command."));
       cmSystemTools::SetFatalErrorOccured();
       return false;
     }

+ 1 - 1
Tests/RunCMake/add_custom_command/AppendNotOutput-stderr.txt

@@ -1,7 +1,7 @@
 CMake Error at AppendNotOutput.cmake:1 \(add_custom_command\):
   add_custom_command given APPEND option with output
 
-  .*RunCMake/add_custom_command/AppendNotOutput-build/out.*
+    .*RunCMake/add_custom_command/AppendNotOutput-build/out
 
   which is not already a custom command output.
 Call Stack \(most recent call first\):

+ 1 - 1
Tests/RunCMake/add_custom_command/BadByproduct-stderr.txt

@@ -29,7 +29,7 @@ Call Stack \(most recent call first\):
 CMake Error at BadByproduct.cmake:6 \(add_custom_command\):
   add_custom_command attempted to have a file
 
-  .*/f".*
+    .*RunCMake/add_custom_command/f
 
   in a source directory as an output of custom command.
 Call Stack \(most recent call first\):

+ 1 - 1
Tests/RunCMake/add_custom_command/BadOutput-stderr.txt

@@ -29,7 +29,7 @@ Call Stack \(most recent call first\):
 CMake Error at BadOutput.cmake:6 \(add_custom_command\):
   add_custom_command attempted to have a file
 
-  .*/e".*
+    .*RunCMake/add_custom_command/e
 
   in a source directory as an output of custom command.
 Call Stack \(most recent call first\):

+ 1 - 1
Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt

@@ -29,7 +29,7 @@ Call Stack \(most recent call first\):
 CMake Error at BadByproduct.cmake:6 \(add_custom_target\):
   add_custom_target attempted to have a file
 
-  .*/j".*
+    .*RunCMake/add_custom_target/j
 
   in a source directory as an output of custom command.
 Call Stack \(most recent call first\):