File tree Expand file tree Collapse file tree 5 files changed +298
-231
lines changed
Expand file tree Collapse file tree 5 files changed +298
-231
lines changed Original file line number Diff line number Diff line change 1+ void
2+ #if defined(_WIN32 )
3+ __declspec(dllexport )
4+ #endif
5+ _Block_release (void ) { }
6+
Original file line number Diff line number Diff line change 1+ list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /../../../test/cmake/modules" )
2+
3+ include (SwiftTestUtils)
4+
5+ foreach (SDK ${SWIFT_SDKS} )
6+ foreach (ARCH ${SWIFT_SDK_${SDK} _ARCHITECTURES})
7+ get_swift_test_build_flavors(build_flavors "${SDK} " )
8+
9+ foreach (BUILD_FLAVOR build_flavors)
10+ get_swift_test_variant_suffix(VARIANT_SUFFIX "${SDK} " "${ARCH} " "${BUILD_FLAVOR} " )
11+
12+ set (test_bin_dir "${CMAKE_BINARY_DIR} /test${VARIANT_SUFFIX} " )
13+
14+ _add_swift_target_library_single(
15+ BlocksRuntimeStub${VARIANT_SUFFIX}
16+ BlocksRuntimeStub
17+ SHARED
18+ ARCHITECTURE ${ARCH}
19+ SDK ${SDK}
20+ INSTALL_IN_COMPONENT dev
21+ BlocksRuntime.c
22+ )
23+ set_target_properties (BlocksRuntimeStub${VARIANT_SUFFIX} PROPERTIES
24+ ARCHIVE_OUTPUT_DIRECTORY ${test_bin_dir}
25+ LIBRARY_OUTPUT_DIRECTORY ${test_bin_dir}
26+ RUNTIME_OUTPUT_DIRECTORY ${test_bin_dir}
27+ OUTPUT_NAME BlocksRuntime)
28+ endforeach ()
29+ endforeach ()
30+ endforeach ()
31+
Original file line number Diff line number Diff line change @@ -29,9 +29,18 @@ if(SWIFT_BUILD_SDK_OVERLAY)
2929 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
3030 add_subdirectory (StdlibUnittestFoundationExtras)
3131 endif ()
32- # Currently SwiftReflectionTest cannot be built on Windows, due to
33- # dependencies on POSIX symbols
32+ # Currently SwiftReflectionTest cannot be built on Windows, due to
33+ # dependencies on POSIX symbols
3434 if (SWIFT_INCLUDE_TESTS AND (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows" ))
3535 add_subdirectory (SwiftReflectionTest)
3636 endif ()
3737endif ()
38+
39+ # Keep in sync with stdlib/tools/CMakeLists.txt: swift-reflection-test is
40+ # only used when testing dynamic stdlib.
41+ if (SWIFT_BUILD_DYNAMIC_STDLIB AND SWIFT_INCLUDE_TESTS)
42+ # NOTE create a stub BlocksRuntime library that can be used for the
43+ # reflection tests
44+ add_subdirectory (BlocksRuntimeStubs)
45+ endif ()
46+
You can’t perform that action at this time.
0 commit comments