From b70c66e2ccaa626e13e08eea604468a45366c1d8 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 17 Jan 2021 06:30:14 -0500 Subject: [PATCH] - make ARM compiler flags optional, detect based on ${ZDOOM_TARGET_ARCH}, do not activate on Apple build systems --- src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d81208556..f131de3b5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -319,7 +319,11 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) set( CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers -ffp-contract=off ${CMAKE_CXX_FLAGS}" ) # ARM processors (Raspberry Pi, et al) - enable ARM NEON support. - if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") + if(${ZDOOM_TARGET_ARCH} MATCHES "arm" AND NOT APPLE) + set (USE_LINUX_ARM 1 CACHE BOOL "Compile for ARM - Linux") + endif () + + if (USE_LINUX_ARM) set (USE_ARMV8 0 CACHE BOOL "Use ARMv8 instructions - Raspberry Pi 3") if (USE_ARMV8) set( CMAKE_CXX_FLAGS "-mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mtune=cortex-a53 -mhard-float -DNO_SSE ${CMAKE_CXX_FLAGS}" )