File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed
stdlib/private/SwiftReflectionTest Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -419,6 +419,12 @@ include_directories(BEFORE
419
419
# endif()
420
420
set (SWIFT_DARWIN_VARIANTS "^(macosx|iphoneos|iphonesimulator|appletvos|appletvsimulator|watchos|watchsimulator)" )
421
421
422
+ # A convenient list to match Darwin SDKs. Example:
423
+ # if("${SWIFT_HOST_VARIANT_SDK}" IN_LIST SWIFT_APPLE_PLATFORMS)
424
+ # ...
425
+ # endif()
426
+ set (SWIFT_APPLE_PLATFORMS "IOS" "IOS_SIMULATOR" "TVOS" "TVOS_SIMULATOR" "WATCHOS" "WATCHOS_SIMULATOR" "OSX" )
427
+
422
428
# Configuration flags passed to all of our invocations of gyb. Try to
423
429
# avoid making up new variable names here if you can find a CMake
424
430
# variable that will do the job.
Original file line number Diff line number Diff line change @@ -1250,7 +1250,7 @@ function(add_swift_library name)
1250
1250
set (SWIFTLIB_TARGET_SDKS ${SWIFT_SDKS} )
1251
1251
endif ()
1252
1252
list_replace (SWIFTLIB_TARGET_SDKS ALL_POSIX_PLATFORMS "ALL_APPLE_PLATFORMS;ANDROID;CYGWIN;FREEBSD;LINUX" )
1253
- list_replace (SWIFTLIB_TARGET_SDKS ALL_APPLE_PLATFORMS "IOS;IOS_SIMULATOR;TVOS;TVOS_SIMULATOR;WATCHOS;WATCHOS_SIMULATOR;OSX " )
1253
+ list_replace (SWIFTLIB_TARGET_SDKS ALL_APPLE_PLATFORMS "${SWIFT_APPLE_PLATFORMS} " )
1254
1254
1255
1255
# All Swift code depends on the standard library, except for the standard
1256
1256
# library itself.
Original file line number Diff line number Diff line change @@ -3,14 +3,17 @@ if (SWIFT_INCLUDE_TESTS)
3
3
add_swift_library (swiftSwiftReflectionTest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
4
4
SwiftReflectionTest.swift
5
5
SWIFT_MODULE_DEPENDS Darwin
6
+ TARGET_SDKS ALL_APPLE_PLATFORMS
6
7
INSTALL_IN_COMPONENT stdlib-experimental )
7
8
8
9
foreach (SDK ${SWIFT_SDKS} )
9
- foreach (ARCH ${SWIFT_SDK_${SDK}_ARCHITECTURES} )
10
- set (VARIANT_SUFFIX "-${SWIFT_SDK_${SDK} _LIB_SUBDIR}-${ARCH} " )
11
- add_dependencies (
12
- "swiftSwiftReflectionTest${VARIANT_SUFFIX} "
13
- "swift-reflection-test${VARIANT_SUFFIX} " )
14
- endforeach ()
10
+ if ("${SDK} " IN_LIST SWIFT_APPLE_PLATFORMS )
11
+ foreach (ARCH ${SWIFT_SDK_${SDK}_ARCHITECTURES} )
12
+ set (VARIANT_SUFFIX "-${SWIFT_SDK_${SDK} _LIB_SUBDIR}-${ARCH} " )
13
+ add_dependencies (
14
+ "swiftSwiftReflectionTest${VARIANT_SUFFIX} "
15
+ "swift-reflection-test${VARIANT_SUFFIX} " )
16
+ endforeach ()
17
+ endif ()
15
18
endforeach ()
16
19
endif ()
You can’t perform that action at this time.
0 commit comments