Skip to content

[CMake] Move the _add_swift_target_library_single() call for BlocksRuntimeStub under the SWIFT_BUILD_STDLIB check #30275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,30 +240,30 @@ foreach(SDK ${SWIFT_SDKS})
set(test_dependencies)
get_test_dependencies("${SDK}" test_dependencies)

# NOTE create a stub BlocksRuntime library that can be used for the
# reflection tests
file(WRITE ${test_bin_dir}/Inputs/BlocksRuntime.c
"void
if(SWIFT_BUILD_STDLIB AND SWIFT_INCLUDE_TESTS)
# NOTE create a stub BlocksRuntime library that can be used for the
# reflection tests
file(WRITE ${test_bin_dir}/Inputs/BlocksRuntime.c
"void
#if defined(_WIN32)
__declspec(dllexport)
#endif
_Block_release(void) { }\n")
_add_swift_target_library_single(
BlocksRuntimeStub${VARIANT_SUFFIX}
BlocksRuntimeStub
SHARED
ARCHITECTURE ${ARCH}
SDK ${SDK}
INSTALL_IN_COMPONENT dev
${test_bin_dir}/Inputs/BlocksRuntime.c)
set_target_properties(BlocksRuntimeStub${VARIANT_SUFFIX} PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${test_bin_dir}
LIBRARY_OUTPUT_DIRECTORY ${test_bin_dir}
RUNTIME_OUTPUT_DIRECTORY ${test_bin_dir}
OUTPUT_NAME BlocksRuntime)
list(APPEND test_dependencies BlocksRuntimeStub${VARIANT_SUFFIX})
_add_swift_target_library_single(
BlocksRuntimeStub${VARIANT_SUFFIX}
BlocksRuntimeStub
SHARED
ARCHITECTURE ${ARCH}
SDK ${SDK}
INSTALL_IN_COMPONENT dev
${test_bin_dir}/Inputs/BlocksRuntime.c)
set_target_properties(BlocksRuntimeStub${VARIANT_SUFFIX} PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${test_bin_dir}
LIBRARY_OUTPUT_DIRECTORY ${test_bin_dir}
RUNTIME_OUTPUT_DIRECTORY ${test_bin_dir}
OUTPUT_NAME BlocksRuntime)
list(APPEND test_dependencies BlocksRuntimeStub${VARIANT_SUFFIX})

if(SWIFT_BUILD_STDLIB AND SWIFT_INCLUDE_TESTS)
list(APPEND test_dependencies
"swift-test-stdlib-${SWIFT_SDK_${SDK}_LIB_SUBDIR}")

Expand Down