mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 20:29:49 -05:00
committed by
Brad King
parent
ed9abd9977
commit
c9c79dde41
@@ -125,6 +125,7 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
|||||||
include(CMakeDetermineCompilerId)
|
include(CMakeDetermineCompilerId)
|
||||||
set(userflags)
|
set(userflags)
|
||||||
CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT} "${userflags}")
|
CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT} "${userflags}")
|
||||||
|
set(_variant "")
|
||||||
if("x${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}" STREQUAL "xIAR")
|
if("x${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}" STREQUAL "xIAR")
|
||||||
# primary necessary to detect architecture, so the right archiver and linker can be picked
|
# primary necessary to detect architecture, so the right archiver and linker can be picked
|
||||||
# eg. "IAR Assembler V8.10.1.12857/W32 for ARM" or "IAR Assembler V4.11.1.4666 for Renesas RX"
|
# eg. "IAR Assembler V8.10.1.12857/W32 for ARM" or "IAR Assembler V4.11.1.4666 for Renesas RX"
|
||||||
@@ -137,6 +138,19 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
|||||||
if(_all_compileid_matches)
|
if(_all_compileid_matches)
|
||||||
list(GET _all_compileid_matches "-1" CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID)
|
list(GET _all_compileid_matches "-1" CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID)
|
||||||
endif()
|
endif()
|
||||||
|
elseif("x${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}" STREQUAL "xClang")
|
||||||
|
# Test whether an MSVC-like command-line option works.
|
||||||
|
execute_process(COMMAND ${CMAKE_ASM${ASM_DIALECT}_COMPILER} -?
|
||||||
|
OUTPUT_VARIABLE _clang_output
|
||||||
|
ERROR_VARIABLE _clang_output
|
||||||
|
RESULT_VARIABLE _clang_result)
|
||||||
|
if(_clang_result EQUAL 0)
|
||||||
|
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_FRONTEND_VARIANT "MSVC")
|
||||||
|
set(CMAKE_ASM${ASM_DIALECT}_SIMULATE_ID MSVC)
|
||||||
|
else()
|
||||||
|
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_FRONTEND_VARIANT "GNU")
|
||||||
|
endif()
|
||||||
|
set(_variant " with ${CMAKE_ASM${ASM_DIALECT}_COMPILER_FRONTEND_VARIANT}-like command-line")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
_cmake_find_compiler_sysroot(ASM${ASM_DIALECT})
|
_cmake_find_compiler_sysroot(ASM${ASM_DIALECT})
|
||||||
@@ -144,6 +158,8 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
|||||||
unset(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_OUTPUT)
|
unset(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_OUTPUT)
|
||||||
unset(_all_compileid_matches)
|
unset(_all_compileid_matches)
|
||||||
unset(_compileid)
|
unset(_compileid)
|
||||||
|
unset(_clang_result)
|
||||||
|
unset(_clang_output)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
||||||
@@ -157,9 +173,10 @@ if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
|||||||
else()
|
else()
|
||||||
set(_archid "")
|
set(_archid "")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}${_archid}${_version}")
|
message(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}${_archid}${_version}${_variant}")
|
||||||
unset(_archid)
|
unset(_archid)
|
||||||
unset(_version)
|
unset(_version)
|
||||||
|
unset(_variant)
|
||||||
else()
|
else()
|
||||||
message(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
|
message(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user