Skip to content

Commit

Permalink
Pass through unknown architectures
Browse files Browse the repository at this point in the history
Conan supports non-standard architectures through the installation of
custom settings.yml files. However, conan-cmake currently expects to be
able to translate the architecture from the CMake naming scheme to the
Conan naming scheme, and fails with an error if the architecture is
unknown.

This patch resolves the issue by making the script simply pass through
the CMake architecture to Conan unchanged in these cases.
  • Loading branch information
jhol committed Oct 30, 2023
1 parent 58f1653 commit 9a990e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions conan_provider.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ function(detect_arch ARCH)
set(_ARCH x86)
elseif(host_arch MATCHES "AMD64|amd64|x86_64|x64")
set(_ARCH x86_64)
else()
set(_ARCH "${CMAKE_SYSTEM_PROCESSOR}")
endif()
message(STATUS "CMake-Conan: cmake_system_processor=${_ARCH}")
set(${ARCH} ${_ARCH} PARENT_SCOPE)
Expand Down

0 comments on commit 9a990e9

Please sign in to comment.