a better way to define x86 architecture

This commit is contained in:
Michael Podvitskiy 2024-02-07 20:15:17 +01:00
parent 1895235ae2
commit 1baba975e2

View file

@ -878,8 +878,9 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES "arm64" OR CMAKE_GENERATOR_PLATFORM_LWR MATC
list(APPEND ARCH_FLAGS -mno-unaligned-access) list(APPEND ARCH_FLAGS -mno-unaligned-access)
endif() endif()
endif() endif()
elseif ((APPLE AND CMAKE_OSX_ARCHITECTURES AND ("${CMAKE_OSX_ARCHITECTURES}" MATCHES "x86_64")) OR elseif (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR CMAKE_GENERATOR_PLATFORM_LWR MATCHES "^(x86_64|i686|amd64|x64|win32)$" OR
(((APPLE AND NOT CMAKE_OSX_ARCHITECTURES) OR NOT APPLE) AND ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "^(x86_64|i686|AMD64)$" OR "${CMAKE_GENERATOR_PLATFORM_LWR}" MATCHES "^(x86_64|i686|amd64|x64)$" ))) (NOT CMAKE_OSX_ARCHITECTURES AND NOT CMAKE_GENERATOR_PLATFORM_LWR AND
(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|i686|AMD64)$")))
message(STATUS "x86 detected") message(STATUS "x86 detected")
if (MSVC) if (MSVC)
# instruction set detection for MSVC only # instruction set detection for MSVC only