diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-05-17 17:23:34 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-05-17 17:26:11 (GMT) |
commit | 9e24af01375d370ae84c40a95501aa5a33d3fe97 (patch) | |
tree | cb39dc478d6e4742d143244a16cffe75ff22539c /Modules/CMakeCompilerIdDetection.cmake | |
parent | 3f25f873f8f0cd4c9c8d5dce29535c6b2757eaea (diff) | |
download | CMake-9e24af01375d370ae84c40a95501aa5a33d3fe97.zip CMake-9e24af01375d370ae84c40a95501aa5a33d3fe97.tar.gz CMake-9e24af01375d370ae84c40a95501aa5a33d3fe97.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 7ca79bd..f2d43b6 100644 --- a/Modules/CMakeCompilerIdDetection.cmake +++ b/Modules/CMakeCompilerIdDetection.cmake @@ -95,13 +95,13 @@ function(compiler_id_detection outvar lang) if(CID_ID_DEFINE) foreach(Id ${ordered_compilers}) - set(CMAKE_${lang}_COMPILER_ID_CONTENT "${CMAKE_${lang}_COMPILER_ID_CONTENT}# define ${CID_PREFIX}COMPILER_IS_${Id} 0\n") + string(APPEND CMAKE_${lang}_COMPILER_ID_CONTENT "# define ${CID_PREFIX}COMPILER_IS_${Id} 0\n") endforeach() endif() set(pp_if "#if") if (CID_VERSION_STRINGS) - set(CMAKE_${lang}_COMPILER_ID_CONTENT "${CMAKE_${lang}_COMPILER_ID_CONTENT}\n/* Version number components: V=Version, R=Revision, P=Patch + string(APPEND CMAKE_${lang}_COMPILER_ID_CONTENT "\n/* Version number components: V=Version, R=Revision, P=Patch Version date components: YYYY=Year, MM=Month, DD=Day */\n") endif() @@ -126,7 +126,7 @@ function(compiler_id_detection outvar lang) string(CONFIGURE "${_compiler_id_version_compute_${Id}}" VERSION_BLOCK @ONLY) string(APPEND id_content "${VERSION_BLOCK}\n") endif() - set(CMAKE_${lang}_COMPILER_ID_CONTENT "${CMAKE_${lang}_COMPILER_ID_CONTENT}\n${id_content}") + string(APPEND CMAKE_${lang}_COMPILER_ID_CONTENT "\n${id_content}") set(pp_if "#elif") endforeach() @@ -145,7 +145,7 @@ function(compiler_id_detection outvar lang) # define ${CID_PREFIX}COMPILER_ID \"\"") endif() - set(CMAKE_${lang}_COMPILER_ID_CONTENT "${CMAKE_${lang}_COMPILER_ID_CONTENT}\n${platform_compiler_detection}\n#endif") + string(APPEND CMAKE_${lang}_COMPILER_ID_CONTENT "\n${platform_compiler_detection}\n#endif") endif() set(${outvar} ${CMAKE_${lang}_COMPILER_ID_CONTENT} PARENT_SCOPE) |