Files
swift-mirror/include/swift/Runtime/CMakeLists.txt
Connor Wakamo 9367125f85 [CMake] Also treat builds in Playgrounds trains as "Xcode" builds.
These builds are meant to be as close to Xcode train builds as possible, so it
makes sense to treat them this way instead of letting them be treated as OS
builds or making a new kind of B&I build for them.

Playgrounds trains are identifiable via the `RC_PLAYGROUNDS` environment
variable being set to `YES`; if that isn't set, then it's not a Playgrounds
train.

This addresses <rdar://problem/85511438>.
2021-11-18 16:08:24 -08:00

17 lines
633 B
CMake

# Detect B&I builds.
set(SWIFT_BNI_OS_BUILD FALSE)
set(SWIFT_BNI_XCODE_BUILD FALSE)
if(DEFINED ENV{RC_XBS})
if((NOT DEFINED ENV{RC_XCODE} OR NOT "$ENV{RC_XCODE}") AND (NOT DEFINED ENV{RC_PLAYGROUNDS} OR NOT "$ENV{RC_PLAYGROUNDS}"))
set(SWIFT_BNI_OS_BUILD TRUE)
else()
set(SWIFT_BNI_XCODE_BUILD TRUE)
endif()
endif()
configure_file(CMakeConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/CMakeConfig.h
ESCAPE_QUOTES @ONLY)
swift_install_in_component(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeConfig.h
DESTINATION "include/swift/Runtime"
COMPONENT testsuite-tools)