We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ba4cec commit 46e720dCopy full SHA for 46e720d
1 file changed
source/CMakeLists.txt
@@ -1,12 +1,14 @@
1
cmake_minimum_required(VERSION 3.30)
2
3
# CMAKE_OSX_SYSROOT is a macOS-specific setting that specifies the SDK path.
4
-# This is ignored on non-Apple platforms, so it's safe to include in cross-platform builds.
5
-execute_process(
6
- COMMAND xcrun --show-sdk-path
7
- OUTPUT_VARIABLE CMAKE_OSX_SYSROOT
8
- OUTPUT_STRIP_TRAILING_WHITESPACE
9
-)
+# Only query and set it on Apple platforms, where xcrun is expected to exist.
+if(APPLE)
+ execute_process(
+ COMMAND xcrun --show-sdk-path
+ OUTPUT_VARIABLE CMAKE_OSX_SYSROOT
+ OUTPUT_STRIP_TRAILING_WHITESPACE
10
+ )
11
+endif()
12
13
project(BacktestingEngine)
14
0 commit comments