diff options
author | Norbert Lange <nolange79@gmail.com> | 2017-06-27 20:50:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-29 17:25:57 (GMT) |
commit | fea7d69ddeedd72f6a1f8cec5a011696dec832db (patch) | |
tree | 1ee4f0a78fdcd60bf7b6d40babfd149d58c06442 | |
parent | d2a8b5cea6baa0508f9935ac2327fcf63f52c21a (diff) | |
download | CMake-fea7d69ddeedd72f6a1f8cec5a011696dec832db.zip CMake-fea7d69ddeedd72f6a1f8cec5a011696dec832db.tar.gz CMake-fea7d69ddeedd72f6a1f8cec5a011696dec832db.tar.bz2 |
Store CMAKE_ASM_COMPILER_VERSION persistently
We already do this for other languages like C and CXX.
-rw-r--r-- | Modules/CMakeASMCompiler.cmake.in | 2 | ||||
-rw-r--r-- | Modules/CMakeDetermineASMCompiler.cmake | 42 |
2 files changed, 31 insertions, 13 deletions
diff --git a/Modules/CMakeASMCompiler.cmake.in b/Modules/CMakeASMCompiler.cmake.in index 7b94d0f..2decc32 100644 --- a/Modules/CMakeASMCompiler.cmake.in +++ b/Modules/CMakeASMCompiler.cmake.in @@ -7,8 +7,10 @@ set(CMAKE_ASM@ASM_DIALECT@_COMPILER_RANLIB "@_CMAKE_ASM_COMPILER_RANLIB@") set(CMAKE_LINKER "@CMAKE_LINKER@") set(CMAKE_ASM@ASM_DIALECT@_COMPILER_LOADED 1) set(CMAKE_ASM@ASM_DIALECT@_COMPILER_ID "@_CMAKE_ASM_COMPILER_ID@") +set(CMAKE_ASM@ASM_DIALECT@_COMPILER_VERSION "@_CMAKE_ASM_COMPILER_VERSION@") set(CMAKE_ASM@ASM_DIALECT@_COMPILER_ENV_VAR "@_CMAKE_ASM_COMPILER_ENV_VAR@") set(CMAKE_ASM@ASM_DIALECT@_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) set(CMAKE_ASM@ASM_DIALECT@_LINKER_PREFERENCE 0) +@CMAKE_ASM_COMPILER_CUSTOM_CODE@ diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index 34154b4..1ed4e20 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -106,7 +106,13 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) endif() if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) - message(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}") + if(CMAKE_ASM${ASM_DIALECT}_COMPILER_VERSION) + set(_version " ${CMAKE_ASM${ASM_DIALECT}_COMPILER_VERSION}") + else() + set(_version "") + endif() + message(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}${_version}") + unset(_version) else() message(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown") endif() @@ -152,20 +158,30 @@ else() message(STATUS "Didn't find assembler") endif() - -set(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}") -set(_CMAKE_ASM_COMPILER_ID "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}") -set(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}") -set(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}") -set(_CMAKE_ASM_COMPILER_AR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_AR}") -set(_CMAKE_ASM_COMPILER_RANLIB "${CMAKE_ASM${ASM_DIALECT}_COMPILER_RANLIB}") +foreach(_var + COMPILER + COMPILER_ID + COMPILER_ARG1 + COMPILER_ENV_VAR + COMPILER_AR + COMPILER_RANLIB + COMPILER_VERSION + ) + set(_CMAKE_ASM_${_var} "${CMAKE_ASM${ASM_DIALECT}_${_var}}") +endforeach() # configure variables set in this file for fast reload later on configure_file(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in ${CMAKE_PLATFORM_INFO_DIR}/CMakeASM${ASM_DIALECT}Compiler.cmake @ONLY) -set(_CMAKE_ASM_COMPILER) -set(_CMAKE_ASM_COMPILER_ARG1) -set(_CMAKE_ASM_COMPILER_ENV_VAR) -set(_CMAKE_ASM_COMPILER_AR) -set(_CMAKE_ASM_COMPILER_RANLIB) +foreach(_var + COMPILER + COMPILER_ID + COMPILER_ARG1 + COMPILER_ENV_VAR + COMPILER_AR + COMPILER_RANLIB + COMPILER_VERSION + ) + unset(_CMAKE_ASM_${_var}) +endforeach() |