Skip to content

Commit

Permalink
use STREQUAL instead of MATCHES
Browse files Browse the repository at this point in the history
  • Loading branch information
Xarbirus committed Feb 7, 2024
1 parent 1baba97 commit fc57bdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -850,9 +850,9 @@ endif()

set(ARCH_FLAGS "")

if (CMAKE_OSX_ARCHITECTURES MATCHES "arm64" OR CMAKE_GENERATOR_PLATFORM_LWR MATCHES "arm64" OR
if (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64" OR CMAKE_GENERATOR_PLATFORM_LWR STREQUAL "arm64" OR
(NOT CMAKE_OSX_ARCHITECTURES AND NOT CMAKE_GENERATOR_PLATFORM_LWR AND
(CMAKE_SYSTEM_PROCESSOR MATCHES "arm" OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")))
(CMAKE_SYSTEM_PROCESSOR MATCHES "arm" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")))
message(STATUS "ARM detected")
if (MSVC)
add_compile_definitions(__ARM_NEON)
Expand All @@ -878,7 +878,7 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES "arm64" OR CMAKE_GENERATOR_PLATFORM_LWR MATC
list(APPEND ARCH_FLAGS -mno-unaligned-access)
endif()
endif()
elseif (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR CMAKE_GENERATOR_PLATFORM_LWR MATCHES "^(x86_64|i686|amd64|x64|win32)$" OR
elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM_LWR MATCHES "^(x86_64|i686|amd64|x64|win32)$" OR
(NOT CMAKE_OSX_ARCHITECTURES AND NOT CMAKE_GENERATOR_PLATFORM_LWR AND
(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|i686|AMD64)$")))
message(STATUS "x86 detected")
Expand Down

0 comments on commit fc57bdb

Please sign in to comment.