Skip to content

Commit

Permalink
refactor: Use CMAKE_LANG_COMPILER_ARCHITECTURE_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
hwhsu1231 committed Oct 31, 2022
1 parent f85ca89 commit b4bffdf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions conan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ macro(_conan_detect_compiler)

# Detect 'arch'
if(NOT _CONAN_SETTING_ARCH)
if (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "64")
if (CMAKE_${LANGUAGE}_COMPILER_ARCHITECTURE_ID MATCHES "64")
set(_CONAN_SETTING_ARCH x86_64)
elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "^ARM")
elseif (CMAKE_${LANGUAGE}_COMPILER_ARCHITECTURE_ID MATCHES "^ARM")
message(STATUS "Conan: Using default ARM architecture from MSVC")
set(_CONAN_SETTING_ARCH armv6)
elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "86")
elseif (CMAKE_${LANGUAGE}_COMPILER_ARCHITECTURE_ID MATCHES "86")
set(_CONAN_SETTING_ARCH x86)
else ()
message(FATAL_ERROR "Conan: Unknown MSVC architecture [${MSVC_${LANGUAGE}_ARCHITECTURE_ID}]")
message(FATAL_ERROR "Conan: Unknown MSVC architecture [${CMAKE_${LANGUAGE}_COMPILER_ARCHITECTURE_ID}]")
endif()
endif()

Expand Down

0 comments on commit b4bffdf

Please sign in to comment.