Files
swift-mirror/unittests/Threading/CMakeLists.txt
Rintaro Ishizaki 9c9010e5b7 [CMake] Support Macros in Linux
For compiling codes required for macro support, we now need swiftc
compiler in the build machine.

Unlike Darwin OSes, where swiftCore runtime is guaranteed to be present
in /usr/lib, Linux doesn't have ABI stability and the stdlib of the
build machine is not at the specific location. So the built compiler
cannot relies on the shared object in the toolchain.
2023-08-24 17:04:15 +00:00

21 lines
593 B
CMake

if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
("${SWIFT_HOST_VARIANT_ARCH}" STREQUAL "${SWIFT_PRIMARY_VARIANT_ARCH}"))
add_swift_unittest(SwiftThreadingTests IS_TARGET_TEST
Mutex.cpp
ConditionVariable.cpp
Once.cpp
LinuxUlock.cpp
Fatal.cpp
)
target_link_libraries(SwiftThreadingTests
PRIVATE
swiftThreading${SWIFT_PRIMARY_VARIANT_SUFFIX}
swiftCore${SWIFT_PRIMARY_VARIANT_SUFFIX}
)
if(SWIFT_HOST_VARIANT STREQUAL "windows")
target_link_libraries(SwiftThreadingTests PRIVATE Synchronization)
endif()
endif()