Files
swift-mirror/stdlib/public/libexec/swift-backtrace/CMakeLists.txt
Alastair Houghton 1258d45152 [Backtracing] Build work.
Additional shimming required for some builds, as well as a few other build
related tweaks.

rdar://106234311
2023-03-04 15:46:30 +00:00

42 lines
920 B
CMake

# If we're building overlays, make sure we mention the ones we need.
# Otherwise, assume they already exist.
set(darwin)
set(wincrt_sdk)
set(glibc)
if(SWIFT_BUILD_SDK_OVERLAY)
set(darwin Darwin)
set(wincrt_sdk CRT WinSDK)
set(glibc Glibc)
endif()
# Similarly, we only want the _Backtracing dependency if we're building
# with the stdlib.
set(backtracing)
if(SWIFT_BUILD_STDLIB AND SWIFT_ENABLE_BACKTRACING)
set(backtracing _Backtracing)
endif()
if(NOT SWIFT_BUILD_STDLIB)
set(BUILD_STANDALONE TRUE)
endif()
add_swift_target_executable(swift-backtrace BUILD_WITH_LIBEXEC
main.swift
AnsiColor.swift
Target.swift
Themes.swift
Utils.swift
SWIFT_MODULE_DEPENDS ${backtracing}
SWIFT_MODULE_DEPENDS_OSX ${darwin}
SWIFT_MODULE_DEPENDS_WINDOWS ${wincrt_sdk}
SWIFT_MODULE_DEPENDS_LINUX ${glibc}
INSTALL_IN_COMPONENT libexec
COMPILE_FLAGS -parse-as-library
TARGET_SDKS OSX)