summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCompilerIdDetection.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-18 13:03:34 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-05-18 13:03:40 (GMT)
commitbc7d64f896d6e180970cb404cc7699732db34adc (patch)
treec8ad34c4c8987e2c3b0fb0cdd59568551133c6b6 /Modules/CMakeCompilerIdDetection.cmake
parent44f8f839cbdddcb756bdb561b0905933e7551867 (diff)
parent9e24af01375d370ae84c40a95501aa5a33d3fe97 (diff)
downloadCMake-bc7d64f896d6e180970cb404cc7699732db34adc.zip
CMake-bc7d64f896d6e180970cb404cc7699732db34adc.tar.gz
CMake-bc7d64f896d6e180970cb404cc7699732db34adc.tar.bz2
Merge topic 'string-append'
9e24af01 Use string(APPEND) in Modules Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !864
Diffstat (limited to 'Modules/CMakeCompilerIdDetection.cmake')
-rw-r--r--Modules/CMakeCompilerIdDetection.cmake8
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)