diff options
Diffstat (limited to 'Modules/CMakeCompilerIdDetection.cmake')
-rw-r--r-- | Modules/CMakeCompilerIdDetection.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake index d8a0d67..7f82a9d 100644 --- a/Modules/CMakeCompilerIdDetection.cmake +++ b/Modules/CMakeCompilerIdDetection.cmake @@ -17,6 +17,7 @@ function(_readFile file) get_filename_component(name ${file} NAME_WE) string(REGEX REPLACE "-.*" "" CompilerId ${name}) set(_compiler_id_version_compute_${CompilerId} ${_compiler_id_version_compute} PARENT_SCOPE) + set(_compiler_id_simulate_${CompilerId} ${_compiler_id_simulate} PARENT_SCOPE) set(_compiler_id_pp_test_${CompilerId} ${_compiler_id_pp_test} PARENT_SCOPE) endfunction() @@ -114,7 +115,9 @@ function(compiler_id_detection outvar lang) endif() set(id_content "${pp_if} ${_compiler_id_pp_test_${Id}}\n") if (CID_ID_STRING) - set(id_content "${id_content}# define ${CID_PREFIX}COMPILER_ID \"${Id}\"") + 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}") endif() if (CID_ID_DEFINE) set(id_content "${id_content}# undef ${CID_PREFIX}COMPILER_IS_${Id}\n") @@ -122,6 +125,8 @@ function(compiler_id_detection outvar lang) 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") endif() |