We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5416d95 + 4aabe4e commit a48b264Copy full SHA for a48b264
CMakeLists.txt
@@ -1,17 +1,12 @@
1
set(CMAKE_CXX_STANDARD 11)
2
cmake_minimum_required(VERSION 3.11)
3
4
-# Set APPLE_ARM to TRUE if running on Apple Silicon
5
-if(APPLE)
6
- execute_process(COMMAND uname -m OUTPUT_VARIABLE OSX_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
7
- if (OSX_ARCH STREQUAL "arm64")
8
- set(APPLE_ARM TRUE)
9
- else() # x86_64
10
- set(APPLE_ARM FALSE)
11
- endif()
+# Check if CMAKE_SYSTEM_NAME is Darwin (macOS) and CMAKE_SYSTEM_PROCESSOR is arm64
+if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
+ set(APPLE_ARM TRUE)
12
else()
13
set(APPLE_ARM FALSE)
14
-endif(APPLE)
+endif()
15
16
# Set the project name and language
17
if(APPLE)
0 commit comments