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/CMakeTests | |
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/CMakeTests')
-rw-r--r-- | Tests/CMakeTests/ModuleNoticesTest.cmake.in | 2 | ||||
-rw-r--r-- | Tests/CMakeTests/WhileTest.cmake.in | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Tests/CMakeTests/ModuleNoticesTest.cmake.in b/Tests/CMakeTests/ModuleNoticesTest.cmake.in index 8ecebd3..7bea0af 100644 --- a/Tests/CMakeTests/ModuleNoticesTest.cmake.in +++ b/Tests/CMakeTests/ModuleNoticesTest.cmake.in @@ -35,7 +35,7 @@ foreach(module ${all_modules}) message(STATUS "module: ${module}") file(READ "${dir}/${module}" module_content) if(NOT "${module_content}" MATCHES "${notice_regex}") - set(notice_missing "${notice_missing} ${module}\n") + string(APPEND notice_missing " ${module}\n") endif() endforeach() diff --git a/Tests/CMakeTests/WhileTest.cmake.in b/Tests/CMakeTests/WhileTest.cmake.in index cc22978..9066544 100644 --- a/Tests/CMakeTests/WhileTest.cmake.in +++ b/Tests/CMakeTests/WhileTest.cmake.in @@ -2,13 +2,13 @@ set(NUMBERS "") set(COUNT 0) while(COUNT LESS 200) - set(NUMBERS "${NUMBERS} ${COUNT}") + string(APPEND NUMBERS " ${COUNT}") set(COUNT "2${COUNT}") set(NCOUNT 3) while(NCOUNT LESS 31) - set(NUMBERS "${NUMBERS} ${NCOUNT}") - set(NCOUNT "${NCOUNT}0") + string(APPEND NUMBERS " ${NCOUNT}") + string(APPEND NCOUNT "0") endwhile() endwhile() |