diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-07-27 22:41:13 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-07-27 22:41:13 (GMT) |
commit | 5d0d980d9949daf596e10715d686adc95c1c232b (patch) | |
tree | 45ec5b1fd21b10dc996083f5fe5657d8b07c3232 /Modules/CMakeCompilerIdDetection.cmake | |
parent | 73c618be7036c693cbff764b3765de1bf4626cfb (diff) | |
download | CMake-5d0d980d9949daf596e10715d686adc95c1c232b.zip CMake-5d0d980d9949daf596e10715d686adc95c1c232b.tar.gz CMake-5d0d980d9949daf596e10715d686adc95c1c232b.tar.bz2 |
Use string(APPEND) in Modules
Automate with:
find Modules -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 'Modules/CMakeCompilerIdDetection.cmake')
-rw-r--r-- | Modules/CMakeCompilerIdDetection.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake index 1d341e5..17e5302 100644 --- a/Modules/CMakeCompilerIdDetection.cmake +++ b/Modules/CMakeCompilerIdDetection.cmake @@ -120,18 +120,18 @@ function(compiler_id_detection outvar lang) if (CID_ID_STRING) set(PREFIX ${CID_PREFIX}) string(CONFIGURE "${_compiler_id_simulate_${Id}}" SIMULATE_BLOCK @ONLY) - set(id_content "${id_content}# define ${CID_PREFIX}COMPILER_ID \"${Id}\"${SIMULATE_BLOCK}") + string(APPEND id_content "# define ${CID_PREFIX}COMPILER_ID \"${Id}\"${SIMULATE_BLOCK}") endif() if (CID_ID_DEFINE) - set(id_content "${id_content}# undef ${CID_PREFIX}COMPILER_IS_${Id}\n") - set(id_content "${id_content}# define ${CID_PREFIX}COMPILER_IS_${Id} 1\n") + string(APPEND id_content "# undef ${CID_PREFIX}COMPILER_IS_${Id}\n") + string(APPEND id_content "# define ${CID_PREFIX}COMPILER_IS_${Id} 1\n") endif() if (CID_VERSION_STRINGS) set(PREFIX ${CID_PREFIX}) set(MACRO_DEC DEC) set(MACRO_HEX HEX) string(CONFIGURE "${_compiler_id_version_compute_${Id}}" VERSION_BLOCK @ONLY) - set(id_content "${id_content}${VERSION_BLOCK}\n") + string(APPEND id_content "${VERSION_BLOCK}\n") endif() set(CMAKE_${lang}_COMPILER_ID_CONTENT "${CMAKE_${lang}_COMPILER_ID_CONTENT}\n${id_content}") set(pp_if "#elif") |