add_custom_command: Add tests for custom command output checks

This commit is contained in:
Daniel Eiband
2019-09-21 15:16:36 +02:00
parent ebb9346490
commit cbb861ade8
8 changed files with 90 additions and 2 deletions
+2 -2
View File
@@ -396,8 +396,8 @@ bool cmAddCustomCommandCommandCheckOutputs(
// Make sure the file will not be generated into the source
// directory during an out of source build.
if (!mf.CanIWriteThisFile(o)) {
std::string e = "attempted to have a file \"" + o +
"\" in a source directory as an output of custom command.";
std::string e = "attempted to have a file\n\"" + o +
"\"\nin a source directory as an output of custom command.";
status.SetError(e);
cmSystemTools::SetFatalErrorOccured();
return false;