Skip to content

Commit 46e720d

Browse files
mccaffersCopilot
andauthored
Update source/CMakeLists.txt
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 3ba4cec commit 46e720d

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

source/CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
cmake_minimum_required(VERSION 3.30)
22

33
# 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-
)
4+
# Only query and set it on Apple platforms, where xcrun is expected to exist.
5+
if(APPLE)
6+
execute_process(
7+
COMMAND xcrun --show-sdk-path
8+
OUTPUT_VARIABLE CMAKE_OSX_SYSROOT
9+
OUTPUT_STRIP_TRAILING_WHITESPACE
10+
)
11+
endif()
1012

1113
project(BacktestingEngine)
1214

0 commit comments

Comments
 (0)