Răsfoiți Sursa

codespell: Avoid escape sequence that looks like misspelled "nodes"

Brad King 2 ani în urmă
părinte
comite
3728f079af

+ 5 - 5
Source/cmGlobalGhsMultiGenerator.cxx

@@ -101,11 +101,11 @@ bool cmGlobalGhsMultiGenerator::SetGeneratorToolset(std::string const& ts,
 
 
   /* check if the toolset changed from last generate */
   /* check if the toolset changed from last generate */
   if (cmNonempty(prevTool) && !cmSystemTools::ComparePath(gbuild, *prevTool)) {
   if (cmNonempty(prevTool) && !cmSystemTools::ComparePath(gbuild, *prevTool)) {
-    std::string const& e =
-      cmStrCat("toolset build tool: ", gbuild,
-               "\nDoes not match the previously used build tool: ", *prevTool,
-               "\nEither remove the CMakeCache.txt file and CMakeFiles "
-               "directory or choose a different binary directory.");
+    std::string const& e = cmStrCat(
+      "toolset build tool: ", gbuild, '\n',
+      "Does not match the previously used build tool: ", *prevTool, '\n',
+      "Either remove the CMakeCache.txt file and CMakeFiles "
+      "directory or choose a different binary directory.");
     mf->IssueMessage(MessageType::FATAL_ERROR, e);
     mf->IssueMessage(MessageType::FATAL_ERROR, e);
     return false;
     return false;
   }
   }

+ 16 - 16
Source/cmake.cxx

@@ -2369,11 +2369,11 @@ int cmake::ActualConfigure()
   cmValue genName = this->State->GetInitializedCacheValue("CMAKE_GENERATOR");
   cmValue genName = this->State->GetInitializedCacheValue("CMAKE_GENERATOR");
   if (genName) {
   if (genName) {
     if (!this->GlobalGenerator->MatchesGeneratorName(*genName)) {
     if (!this->GlobalGenerator->MatchesGeneratorName(*genName)) {
-      std::string message =
-        cmStrCat("Error: generator : ", this->GlobalGenerator->GetName(),
-                 "\nDoes not match the generator used previously: ", *genName,
-                 "\nEither remove the CMakeCache.txt file and CMakeFiles "
-                 "directory or choose a different binary directory.");
+      std::string message = cmStrCat(
+        "Error: generator : ", this->GlobalGenerator->GetName(), '\n',
+        "Does not match the generator used previously: ", *genName, '\n',
+        "Either remove the CMakeCache.txt file and CMakeFiles "
+        "directory or choose a different binary directory.");
       cmSystemTools::Error(message);
       cmSystemTools::Error(message);
       return -2;
       return -2;
     }
     }
@@ -2399,11 +2399,11 @@ int cmake::ActualConfigure()
   if (cmValue instance =
   if (cmValue instance =
         this->State->GetInitializedCacheValue("CMAKE_GENERATOR_INSTANCE")) {
         this->State->GetInitializedCacheValue("CMAKE_GENERATOR_INSTANCE")) {
     if (this->GeneratorInstanceSet && this->GeneratorInstance != *instance) {
     if (this->GeneratorInstanceSet && this->GeneratorInstance != *instance) {
-      std::string message =
-        cmStrCat("Error: generator instance: ", this->GeneratorInstance,
-                 "\nDoes not match the instance used previously: ", *instance,
-                 "\nEither remove the CMakeCache.txt file and CMakeFiles "
-                 "directory or choose a different binary directory.");
+      std::string message = cmStrCat(
+        "Error: generator instance: ", this->GeneratorInstance, '\n',
+        "Does not match the instance used previously: ", *instance, '\n',
+        "Either remove the CMakeCache.txt file and CMakeFiles "
+        "directory or choose a different binary directory.");
       cmSystemTools::Error(message);
       cmSystemTools::Error(message);
       return -2;
       return -2;
     }
     }
@@ -2418,9 +2418,9 @@ int cmake::ActualConfigure()
     if (this->GeneratorPlatformSet &&
     if (this->GeneratorPlatformSet &&
         this->GeneratorPlatform != *platformName) {
         this->GeneratorPlatform != *platformName) {
       std::string message = cmStrCat(
       std::string message = cmStrCat(
-        "Error: generator platform: ", this->GeneratorPlatform,
-        "\nDoes not match the platform used previously: ", *platformName,
-        "\nEither remove the CMakeCache.txt file and CMakeFiles "
+        "Error: generator platform: ", this->GeneratorPlatform, '\n',
+        "Does not match the platform used previously: ", *platformName, '\n',
+        "Either remove the CMakeCache.txt file and CMakeFiles "
         "directory or choose a different binary directory.");
         "directory or choose a different binary directory.");
       cmSystemTools::Error(message);
       cmSystemTools::Error(message);
       return -2;
       return -2;
@@ -2434,9 +2434,9 @@ int cmake::ActualConfigure()
         this->State->GetInitializedCacheValue("CMAKE_GENERATOR_TOOLSET")) {
         this->State->GetInitializedCacheValue("CMAKE_GENERATOR_TOOLSET")) {
     if (this->GeneratorToolsetSet && this->GeneratorToolset != *tsName) {
     if (this->GeneratorToolsetSet && this->GeneratorToolset != *tsName) {
       std::string message =
       std::string message =
-        cmStrCat("Error: generator toolset: ", this->GeneratorToolset,
-                 "\nDoes not match the toolset used previously: ", *tsName,
-                 "\nEither remove the CMakeCache.txt file and CMakeFiles "
+        cmStrCat("Error: generator toolset: ", this->GeneratorToolset, '\n',
+                 "Does not match the toolset used previously: ", *tsName, '\n',
+                 "Either remove the CMakeCache.txt file and CMakeFiles "
                  "directory or choose a different binary directory.");
                  "directory or choose a different binary directory.");
       cmSystemTools::Error(message);
       cmSystemTools::Error(message);
       return -2;
       return -2;

+ 13 - 13
Tests/Module/ExternalData/Data1Check.cmake

@@ -1,24 +1,24 @@
 file(STRINGS "${Data}" lines LIMIT_INPUT 1024)
 file(STRINGS "${Data}" lines LIMIT_INPUT 1024)
 if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
 if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
-  message(SEND_ERROR "Input file:\n  ${Data}\ndoes not have expected content, but [[${lines}]]")
+  message(SEND_ERROR "Input file:\n  ${Data}\n" "does not have expected content, but [[${lines}]]")
 endif()
 endif()
 if(DEFINED DataSpace)
 if(DEFINED DataSpace)
   file(STRINGS "${DataSpace}" lines LIMIT_INPUT 1024)
   file(STRINGS "${DataSpace}" lines LIMIT_INPUT 1024)
   if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
   if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
-    message(SEND_ERROR "Input file:\n  ${DataSpace}\ndoes not have expected content, but [[${lines}]]")
+    message(SEND_ERROR "Input file:\n  ${DataSpace}\n" "does not have expected content, but [[${lines}]]")
   endif()
   endif()
 endif()
 endif()
 file(STRINGS "${DataScript}" lines LIMIT_INPUT 1024)
 file(STRINGS "${DataScript}" lines LIMIT_INPUT 1024)
 if(NOT "x${lines}" STREQUAL "xDataScript")
 if(NOT "x${lines}" STREQUAL "xDataScript")
-  message(SEND_ERROR "Input file:\n  ${DataScript}\ndoes not have expected content, but [[${lines}]]")
+  message(SEND_ERROR "Input file:\n  ${DataScript}\n" "does not have expected content, but [[${lines}]]")
 endif()
 endif()
 file(STRINGS "${DataAlgoMapA}" lines LIMIT_INPUT 1024)
 file(STRINGS "${DataAlgoMapA}" lines LIMIT_INPUT 1024)
 if(NOT "x${lines}" STREQUAL "xDataAlgoMap")
 if(NOT "x${lines}" STREQUAL "xDataAlgoMap")
-  message(SEND_ERROR "Input file:\n  ${DataAlgoMapA}\ndoes not have expected content, but [[${lines}]]")
+  message(SEND_ERROR "Input file:\n  ${DataAlgoMapA}\n" "does not have expected content, but [[${lines}]]")
 endif()
 endif()
 file(STRINGS "${DataAlgoMapB}" lines LIMIT_INPUT 1024)
 file(STRINGS "${DataAlgoMapB}" lines LIMIT_INPUT 1024)
 if(NOT "x${lines}" STREQUAL "xDataAlgoMap")
 if(NOT "x${lines}" STREQUAL "xDataAlgoMap")
-  message(SEND_ERROR "Input file:\n  ${DataAlgoMapB}\ndoes not have expected content, but [[${lines}]]")
+  message(SEND_ERROR "Input file:\n  ${DataAlgoMapB}\n" "does not have expected content, but [[${lines}]]")
 endif()
 endif()
 if(DataMissing)
 if(DataMissing)
   if(EXISTS "${DataMissing}")
   if(EXISTS "${DataMissing}")
@@ -54,7 +54,7 @@ foreach(s A B C D)
   foreach(n "" ${Series${s}l})
   foreach(n "" ${Series${s}l})
     string(REGEX REPLACE "\\.dat$" "${n}.dat" file "${Series${s}}")
     string(REGEX REPLACE "\\.dat$" "${n}.dat" file "${Series${s}}")
     if(NOT EXISTS "${file}")
     if(NOT EXISTS "${file}")
-      message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
+      message(SEND_ERROR "Input file:\n  ${file}\n" "does not exist!")
     endif()
     endif()
   endforeach()
   endforeach()
 endforeach()
 endforeach()
@@ -62,45 +62,45 @@ foreach(s A B C D)
   foreach(n ${Series${s}l})
   foreach(n ${Series${s}l})
     string(REGEX REPLACE "${Series${s}n1}$" "${n}.dat" file "${Series${s}n}")
     string(REGEX REPLACE "${Series${s}n1}$" "${n}.dat" file "${Series${s}n}")
     if(NOT EXISTS "${file}")
     if(NOT EXISTS "${file}")
-      message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
+      message(SEND_ERROR "Input file:\n  ${file}\n" "does not exist!")
     endif()
     endif()
   endforeach()
   endforeach()
 endforeach()
 endforeach()
 foreach(n .1 .2 .3 .4)
 foreach(n .1 .2 .3 .4)
   string(REGEX REPLACE "\\.1\\.dat$" "${n}.dat" file "${SeriesMixed}")
   string(REGEX REPLACE "\\.1\\.dat$" "${n}.dat" file "${SeriesMixed}")
   if(NOT EXISTS "${file}")
   if(NOT EXISTS "${file}")
-    message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
+    message(SEND_ERROR "Input file:\n  ${file}\n" "does not exist!")
   endif()
   endif()
 endforeach()
 endforeach()
 foreach(n A B)
 foreach(n A B)
   string(REGEX REPLACE "A\\.dat$" "${n}.dat" file "${Paired}")
   string(REGEX REPLACE "A\\.dat$" "${n}.dat" file "${Paired}")
   if(NOT EXISTS "${file}")
   if(NOT EXISTS "${file}")
-    message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
+    message(SEND_ERROR "Input file:\n  ${file}\n" "does not exist!")
   endif()
   endif()
 endforeach()
 endforeach()
 foreach(n Top A B C)
 foreach(n Top A B C)
   string(REGEX REPLACE "Top\\.dat$" "${n}.dat" file "${Meta}")
   string(REGEX REPLACE "Top\\.dat$" "${n}.dat" file "${Meta}")
   if(NOT EXISTS "${file}")
   if(NOT EXISTS "${file}")
-    message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
+    message(SEND_ERROR "Input file:\n  ${file}\n" "does not exist!")
   endif()
   endif()
 endforeach()
 endforeach()
 foreach(n A B C)
 foreach(n A B C)
   set(file "${Directory}/${n}.dat")
   set(file "${Directory}/${n}.dat")
   if(NOT EXISTS "${file}")
   if(NOT EXISTS "${file}")
-    message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
+    message(SEND_ERROR "Input file:\n  ${file}\n" "does not exist!")
   endif()
   endif()
 endforeach()
 endforeach()
 foreach(n A Sub1/A Sub2/Dir/A B Sub1/B Sub2/Dir/B C Sub1/C Sub2/Dir/C)
 foreach(n A Sub1/A Sub2/Dir/A B Sub1/B Sub2/Dir/B C Sub1/C Sub2/Dir/C)
   set(file "${DirRecurse}/${n}.dat")
   set(file "${DirRecurse}/${n}.dat")
   if(NOT EXISTS "${file}")
   if(NOT EXISTS "${file}")
-    message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
+    message(SEND_ERROR "Input file:\n  ${file}\n" "does not exist!")
   endif()
   endif()
 endforeach()
 endforeach()
 list(LENGTH Semicolons len)
 list(LENGTH Semicolons len)
 if("${len}" EQUAL 2)
 if("${len}" EQUAL 2)
   foreach(file ${Semicolons})
   foreach(file ${Semicolons})
     if(NOT EXISTS "${file}")
     if(NOT EXISTS "${file}")
-      message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
+      message(SEND_ERROR "Input file:\n  ${file}\n" "does not exist!")
     endif()
     endif()
   endforeach()
   endforeach()
 else()
 else()

+ 2 - 2
Tests/Module/ExternalData/Data2/Data2Check.cmake

@@ -1,12 +1,12 @@
 foreach(d "${Data2}" "${Data2b}")
 foreach(d "${Data2}" "${Data2b}")
   file(STRINGS "${d}" lines LIMIT_INPUT 1024)
   file(STRINGS "${d}" lines LIMIT_INPUT 1024)
   if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
   if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
-    message(SEND_ERROR "Input file:\n  ${d}\ndoes not have expected content, but [[${lines}]]")
+    message(SEND_ERROR "Input file:\n  ${d}\n" "does not have expected content, but [[${lines}]]")
   endif()
   endif()
 endforeach()
 endforeach()
 foreach(n 1 2 3)
 foreach(n 1 2 3)
   string(REGEX REPLACE "_1_\\.my\\.dat$" "_${n}_.my.dat" SeriesCFile "${SeriesC}")
   string(REGEX REPLACE "_1_\\.my\\.dat$" "_${n}_.my.dat" SeriesCFile "${SeriesC}")
   if(NOT EXISTS "${SeriesCFile}")
   if(NOT EXISTS "${SeriesCFile}")
-    message(SEND_ERROR "Input file:\n  ${SeriesCFile}\ndoes not exist!")
+    message(SEND_ERROR "Input file:\n  ${SeriesCFile}\n" "does not exist!")
   endif()
   endif()
 endforeach()
 endforeach()

+ 2 - 2
Tests/Module/ExternalData/Data3/Data3Check.cmake

@@ -1,8 +1,8 @@
 if(NOT EXISTS "${Data}")
 if(NOT EXISTS "${Data}")
-  message(SEND_ERROR "Input file:\n  ${Data}\ndoes not exist!")
+  message(SEND_ERROR "Input file:\n  ${Data}\n" "does not exist!")
 endif()
 endif()
 if(NOT EXISTS "${Other}")
 if(NOT EXISTS "${Other}")
-  message(SEND_ERROR "Input file:\n  ${Other}\ndoes not exist!")
+  message(SEND_ERROR "Input file:\n  ${Other}\n" "does not exist!")
 endif()
 endif()
 # Verify that the 'Data' object was found in the second store location left
 # Verify that the 'Data' object was found in the second store location left
 # from Data1 target downloads and that the 'Other' object was downloaded to
 # from Data1 target downloads and that the 'Other' object was downloaded to

+ 2 - 2
Tests/Module/ExternalData/Data4/Data4Check.cmake

@@ -1,8 +1,8 @@
 if(NOT EXISTS "${Data}")
 if(NOT EXISTS "${Data}")
-  message(SEND_ERROR "Input file:\n  ${Data}\ndoes not exist!")
+  message(SEND_ERROR "Input file:\n  ${Data}\n" "does not exist!")
 endif()
 endif()
 if(NOT EXISTS "${Other}")
 if(NOT EXISTS "${Other}")
-  message(SEND_ERROR "Input file:\n  ${Other}\ndoes not exist!")
+  message(SEND_ERROR "Input file:\n  ${Other}\n" "does not exist!")
 endif()
 endif()
 # Verify that the 'Data' object was found in the second store location left
 # Verify that the 'Data' object was found in the second store location left
 # from Data1 target downloads and that the 'Other' object was found in the
 # from Data1 target downloads and that the 'Other' object was found in the

+ 1 - 1
Tests/Module/ExternalData/Data5/Data5Check.cmake

@@ -1,4 +1,4 @@
 file(STRINGS "${Data5}" lines LIMIT_INPUT 1024)
 file(STRINGS "${Data5}" lines LIMIT_INPUT 1024)
 if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
 if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
-  message(SEND_ERROR "Input file:\n  ${Data5}\ndoes not have expected content, but [[${lines}]]")
+  message(SEND_ERROR "Input file:\n  ${Data5}\n" "does not have expected content, but [[${lines}]]")
 endif()
 endif()

+ 1 - 1
Tests/Module/ExternalData/DataNoSymlinks/DataNoSymlinksCheck.cmake

@@ -1,5 +1,5 @@
 if(NOT EXISTS "${Data}")
 if(NOT EXISTS "${Data}")
-  message(SEND_ERROR "Input file:\n  ${Data}\ndoes not exist!")
+  message(SEND_ERROR "Input file:\n  ${Data}\n" "does not exist!")
 endif()
 endif()
 if(IS_SYMLINK "${Data}")
 if(IS_SYMLINK "${Data}")
   message(SEND_ERROR "Input file:\n  ${Data}\nis a symlink but should not be!")
   message(SEND_ERROR "Input file:\n  ${Data}\nis a symlink but should not be!")

+ 1 - 1
Tests/RunCMake/File_Generate/CMP0070-NEW-check.cmake

@@ -5,7 +5,7 @@ foreach(f
   if(EXISTS "${f}")
   if(EXISTS "${f}")
     file(READ "${f}" content)
     file(READ "${f}" content)
     if(NOT content MATCHES "^relative-input-NEW[\r\n]*$")
     if(NOT content MATCHES "^relative-input-NEW[\r\n]*$")
-      string(APPEND RunCMake_TEST_FAILED "File\n  ${f}\ndoes not have expected content.\n")
+      string(APPEND RunCMake_TEST_FAILED "File\n  ${f}\n" "does not have expected content.\n")
     endif()
     endif()
   else()
   else()
     string(APPEND RunCMake_TEST_FAILED "Missing\n  ${f}\n")
     string(APPEND RunCMake_TEST_FAILED "Missing\n  ${f}\n")

+ 1 - 1
Tests/RunCMake/File_Generate/CMP0070-OLD-check.cmake

@@ -5,7 +5,7 @@ foreach(f
   if(EXISTS "${f}")
   if(EXISTS "${f}")
     file(READ "${f}" content)
     file(READ "${f}" content)
     if(NOT content MATCHES "^relative-input-OLD[\r\n]*$")
     if(NOT content MATCHES "^relative-input-OLD[\r\n]*$")
-      string(APPEND RunCMake_TEST_FAILED "File\n  ${f}\ndoes not have expected content.\n")
+      string(APPEND RunCMake_TEST_FAILED "File\n  ${f}\n" "does not have expected content.\n")
     endif()
     endif()
   else()
   else()
     string(APPEND RunCMake_TEST_FAILED "Missing\n  ${f}\n")
     string(APPEND RunCMake_TEST_FAILED "Missing\n  ${f}\n")

+ 1 - 1
Tests/RunCMake/File_Generate/CMP0070-WARN-check.cmake

@@ -5,7 +5,7 @@ foreach(f
   if(EXISTS "${f}")
   if(EXISTS "${f}")
     file(READ "${f}" content)
     file(READ "${f}" content)
     if(NOT content MATCHES "^relative-input-WARN[\r\n]*$")
     if(NOT content MATCHES "^relative-input-WARN[\r\n]*$")
-      string(APPEND RunCMake_TEST_FAILED "File\n  ${f}\ndoes not have expected content.\n")
+      string(APPEND RunCMake_TEST_FAILED "File\n  ${f}\n" "does not have expected content.\n")
     endif()
     endif()
   else()
   else()
     string(APPEND RunCMake_TEST_FAILED "Missing\n  ${f}\n")
     string(APPEND RunCMake_TEST_FAILED "Missing\n  ${f}\n")

+ 1 - 1
Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir-check.cmake

@@ -1,6 +1,6 @@
 set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/main.vcxproj")
 set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/main.vcxproj")
 if(NOT EXISTS "${vcProjectFile}")
 if(NOT EXISTS "${vcProjectFile}")
-  set(RunCMake_TEST_FAILED "Project file\n  ${vcProjectFile}\ndoes not exist.")
+  string(CONCAT RunCMake_TEST_FAILED "Project file\n  ${vcProjectFile}\n" "does not exist.")
   return()
   return()
 endif()
 endif()
 
 

+ 1 - 1
Tests/RunCMake/MacOSVersions/MacOSVersions-build-check.cmake

@@ -21,7 +21,7 @@ foreach(ver
     [[compatibility version 2\.1\.0]]
     [[compatibility version 2\.1\.0]]
     )
     )
   if(NOT "${out}" MATCHES "( |\n)${ver}( |\n)")
   if(NOT "${out}" MATCHES "( |\n)${ver}( |\n)")
-    set(RunCMake_TEST_FAILED "Library file:\n  ${lib}\ndoes not contain '${ver}'")
+    string(CONCAT RunCMake_TEST_FAILED "Library file:\n  ${lib}\n" "does not contain '${ver}'")
     return()
     return()
   endif()
   endif()
 endforeach()
 endforeach()

+ 4 - 2
Tests/RunCMake/Ninja/CustomCommandDepfile-check.cmake

@@ -3,8 +3,10 @@ file(READ "${log}" build_file)
 
 
 set(RunCMake_TEST_FAILED)
 set(RunCMake_TEST_FAILED)
 if(NOT "${build_file}" MATCHES "depfile = test\\.d")
 if(NOT "${build_file}" MATCHES "depfile = test\\.d")
-  list(APPEND RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: depfile = test.d")
+  string(CONCAT no_test_d "Log file:\n ${log}\n" "does not have expected line: depfile = test.d")
+  list(APPEND RunCMake_TEST_FAILED "${no_test_d}")
 endif()
 endif()
 if(NOT "${build_file}" MATCHES "depfile = test_Debug\\.d")
 if(NOT "${build_file}" MATCHES "depfile = test_Debug\\.d")
-  list(APPEND RunCMake_TEST_FAILED "\nLog file:\n ${log}\ndoes not have expected line: depfile = test_Debug.d")
+  string(CONCAT no_test_Debug_d "\nLog file:\n ${log}\n" "does not have expected line: depfile = test_Debug.d")
+  list(APPEND RunCMake_TEST_FAILED "${no_test_Debug_d}")
 endif()
 endif()

+ 2 - 2
Tests/RunCMake/Ninja/CustomCommandJobPool-check.cmake

@@ -1,8 +1,8 @@
 set(log "${RunCMake_BINARY_DIR}/CustomCommandJobPool-build/build.ninja")
 set(log "${RunCMake_BINARY_DIR}/CustomCommandJobPool-build/build.ninja")
 file(READ "${log}" build_file)
 file(READ "${log}" build_file)
 if(NOT "${build_file}" MATCHES "pool = custom_command_pool")
 if(NOT "${build_file}" MATCHES "pool = custom_command_pool")
-  set(RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: pool = custom_command_pool")
+  string(CONCAT RunCMake_TEST_FAILED "Log file:\n ${log}\n" "does not have expected line: pool = custom_command_pool")
 endif()
 endif()
 if(NOT "${build_file}" MATCHES "pool = custom_target_pool")
 if(NOT "${build_file}" MATCHES "pool = custom_target_pool")
-  set(RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: pool = custom_target_pool")
+  string(CONCAT RunCMake_TEST_FAILED "Log file:\n ${log}\n" "does not have expected line: pool = custom_target_pool")
 endif()
 endif()

+ 4 - 2
Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile-check.cmake

@@ -3,8 +3,10 @@ file(READ "${log}" build_file)
 
 
 set(RunCMake_TEST_FAILED)
 set(RunCMake_TEST_FAILED)
 if(NOT "${build_file}" MATCHES "depfile = test\\.d")
 if(NOT "${build_file}" MATCHES "depfile = test\\.d")
-  list(APPEND RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: depfile = test.d")
+  string(CONCAT no_test_d "Log file:\n ${log}\n" "does not have expected line: depfile = test.d")
+  list(APPEND RunCMake_TEST_FAILED "${no_test_d}")
 endif()
 endif()
 if(NOT "${build_file}" MATCHES "depfile = test_Debug\\.d")
 if(NOT "${build_file}" MATCHES "depfile = test_Debug\\.d")
-  list(APPEND RunCMake_TEST_FAILED "\nLog file:\n ${log}\ndoes not have expected line: depfile = test_Debug.d")
+  string(CONCAT no_test_Debug_d "\nLog file:\n ${log}\n" "does not have expected line: depfile = test_Debug.d")
+  list(APPEND RunCMake_TEST_FAILED "${no_test_Debug_d}")
 endif()
 endif()

+ 1 - 1
Tests/RunCMake/file/COPY_FILE-file-replace.cmake

@@ -5,5 +5,5 @@ file(WRITE "${newname}" "b")
 file(COPY_FILE "${oldname}" "${newname}")
 file(COPY_FILE "${oldname}" "${newname}")
 file(READ "${newname}" new)
 file(READ "${newname}" new)
 if(NOT "${new}" STREQUAL "a")
 if(NOT "${new}" STREQUAL "a")
-  message(FATAL_ERROR "New name:\n  ${newname}\ndoes not contain expected content 'a'.")
+  message(FATAL_ERROR "New name:\n  ${newname}\n" "does not contain expected content 'a'.")
 endif()
 endif()

+ 1 - 1
Tests/RunCMake/file/COPY_FILE-link-to-file.cmake

@@ -6,5 +6,5 @@ file(CREATE_LINK "${lnkname}" "${oldname}")
 file(COPY_FILE "${oldname}" "${newname}")
 file(COPY_FILE "${oldname}" "${newname}")
 file(READ "${newname}" new)
 file(READ "${newname}" new)
 if(NOT "${new}" STREQUAL "a")
 if(NOT "${new}" STREQUAL "a")
-  message(FATAL_ERROR "New name:\n  ${newname}\ndoes not contain expected content 'a'.")
+  message(FATAL_ERROR "New name:\n  ${newname}\n" "does not contain expected content 'a'.")
 endif()
 endif()

+ 1 - 1
Tests/RunCMake/file/RENAME-file-replace.cmake

@@ -5,5 +5,5 @@ file(WRITE "${newname}" "b")
 file(RENAME "${oldname}" "${newname}")
 file(RENAME "${oldname}" "${newname}")
 file(READ "${newname}" new)
 file(READ "${newname}" new)
 if(NOT "${new}" STREQUAL "a")
 if(NOT "${new}" STREQUAL "a")
-  message(FATAL_ERROR "New name:\n  ${newname}\ndoes not contain expected content 'a'.")
+  message(FATAL_ERROR "New name:\n  ${newname}\n" "does not contain expected content 'a'.")
 endif()
 endif()