From 864554a200ed1fbceab5a10d7ad47de280d019b9 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Wed, 17 May 2023 23:16:56 +0800 Subject: [PATCH] CMakeLists: use CMAKE_OSX_ARCHITECTURE, not CMAKE_SYSTEM_PROCESSOR --- CMakeLists.txt 2024-03-07 13:46:57.000000000 +0800 +++ CMakeLists.txt 2024-03-15 12:49:25.000000000 +0800 @@ -258,12 +258,8 @@ enable_cxx_compiler_flag_if_supported("-pedantic") endif() -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86\_64|i686)") - if (WIN32) - message("FLAG_MPOPCNT_SUPPORTED is not available on this architecture") - else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt") - endif() +if(CMAKE_OSX_ARCHITECTURE MATCHES "^(x86\_64|i686)") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc64|powerpc64)" AND NOT APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcntd") else()