diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-07-27 22:43:04 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-07-27 22:43:04 (GMT) |
commit | 7a649111cdea2b10f2ec57084416be619867fbfb (patch) | |
tree | 072e1343376835ba4dda7689db02dc51598e005b /Tests/RunCMake/RunCMake.cmake | |
parent | 5d0d980d9949daf596e10715d686adc95c1c232b (diff) | |
download | CMake-7a649111cdea2b10f2ec57084416be619867fbfb.zip CMake-7a649111cdea2b10f2ec57084416be619867fbfb.tar.gz CMake-7a649111cdea2b10f2ec57084416be619867fbfb.tar.bz2 |
Use string(APPEND) in Tests
Automate with:
find Tests -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index fa0c980..247855a 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -95,7 +95,7 @@ function(run_cmake test) endif() set(msg "") if(NOT "${actual_result}" MATCHES "${expect_result}") - set(msg "${msg}Result is [${actual_result}], not [${expect_result}].\n") + string(APPEND msg "Result is [${actual_result}], not [${expect_result}].\n") endif() foreach(o out err) string(REGEX REPLACE "\r\n" "\n" actual_std${o} "${actual_std${o}}") @@ -107,7 +107,7 @@ function(run_cmake test) string(REGEX REPLACE "\n" "\n expect-${o}> " expect_${o} " expect-${o}> ${expect_std${o}}") set(expect_${o} "Expected std${o} to match:\n${expect_${o}}\n") - set(msg "${msg}std${o} does not match that expected.\n") + string(APPEND msg "std${o} does not match that expected.\n") endif() endif() endforeach() @@ -122,7 +122,7 @@ function(run_cmake test) endif() if(msg AND RunCMake_TEST_COMMAND) string(REPLACE ";" "\" \"" command "\"${RunCMake_TEST_COMMAND}\"") - set(msg "${msg}Command was:\n command> ${command}\n") + string(APPEND msg "Command was:\n command> ${command}\n") endif() if(msg) string(REGEX REPLACE "\n" "\n actual-out> " actual_out " actual-out> ${actual_stdout}") |