From 416f4239e175c568f2de6606cde3f749a7252194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 3 Sep 2023 15:18:25 +0200 Subject: [PATCH] Move the HAVE_SYSCTLBYNAME definition out of X86, remove the previous workaround --- CMakeLists.txt | 4 ---- ext/cmake/cpu_features/CMakeLists.txt | 6 ++---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 692989c998..4d6033eada 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -272,10 +272,6 @@ if(MACOSX AND NOT IOS) endif() endif() -if(IOS) - add_definitions(-DHAVE_SYSCTLBYNAME) -endif() - include(FindThreads) if(APPLE) diff --git a/ext/cmake/cpu_features/CMakeLists.txt b/ext/cmake/cpu_features/CMakeLists.txt index fc85355dc1..5524191d06 100644 --- a/ext/cmake/cpu_features/CMakeLists.txt +++ b/ext/cmake/cpu_features/CMakeLists.txt @@ -154,10 +154,8 @@ endif() target_include_directories(cpu_features PUBLIC $ ) -if(PROCESSOR_IS_X86) - if(APPLE) - target_compile_definitions(cpu_features PRIVATE HAVE_SYSCTLBYNAME) - endif() +if(APPLE) + target_compile_definitions(cpu_features PRIVATE HAVE_SYSCTLBYNAME) endif() add_library(CpuFeature::cpu_features ALIAS cpu_features)