Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: TEST #661

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
Set detect_arch variables and arguments to lower-case snake-case
  • Loading branch information
jhol committed Jul 31, 2024
commit 07c8436fb0b126881add4f69c851dc7c320cefc9
16 changes: 8 additions & 8 deletions conan_provider.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function(detect_os os os_api_level os_sdk os_subsystem os_version)
endfunction()


function(detect_arch ARCH)
function(detect_arch arch)
# CMAKE_OSX_ARCHITECTURES can contain multiple architectures, but Conan only supports one.
# Therefore this code only finds one. If the recipes support multiple architectures, the
# build will work. Otherwise, there will be a linker error for the missing architecture(s).
Expand All @@ -113,18 +113,18 @@ function(detect_arch ARCH)
set(host_arch ${CMAKE_SYSTEM_PROCESSOR})
endif()
if(host_arch MATCHES "aarch64|arm64|ARM64")
set(_ARCH armv8)
set(_arch armv8)
elseif(host_arch MATCHES "armv7|armv7-a|armv7l|ARMV7")
set(_ARCH armv7)
set(_arch armv7)
elseif(host_arch MATCHES armv7s)
set(_ARCH armv7s)
set(_arch armv7s)
elseif(host_arch MATCHES "i686|i386|X86")
set(_ARCH x86)
set(_arch x86)
elseif(host_arch MATCHES "AMD64|amd64|x86_64|x64")
set(_ARCH x86_64)
set(_arch x86_64)
endif()
message(STATUS "CMake-Conan: cmake_system_processor=${_ARCH}")
set(${ARCH} ${_ARCH} PARENT_SCOPE)
message(STATUS "CMake-Conan: cmake_system_processor=${_arch}")
set(${arch} ${_arch} PARENT_SCOPE)
endfunction()


Expand Down
Loading