Files
swift-atomics/Tests/CMakeLists.txt
T
Saleem Abdulrasool 907a24f5f2 Add the ability to run tests via CMake
This adds the ability to run the test suite via CMake + Ninja.
2021-04-30 09:13:39 -07:00

34 lines
1006 B
CMake

#[[
This source file is part of the Swift Atomics Open Source Project
Copyright (c) 2021 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See https://swift.org/LICENSE.txt for license information
#]]
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
find_package(dispatch CONFIG)
find_package(Foundation CONFIG)
endif()
find_package(XCTest CONFIG)
add_executable(AtomicsTestBundle
AtomicsTests/main.swift
AtomicsTests/autogenerated/Basics.swift
AtomicsTests/DoubleWord.swift
AtomicsTests/LifetimeTracked.swift
AtomicsTests/LockFreeQueue.swift
AtomicsTests/LockFreeSingleConsumerStack.swift
AtomicsTests/StrongReferenceRace.swift
AtomicsTests/StrongReferenceShuffle.swift
AtomicsTests/UnsafeAtomicLazyReference.swift)
target_link_libraries(AtomicsTestBundle PRIVATE
Atomics
XCTest
$<$<NOT:$<PLATFORM_ID:Darwin>>:dispatch>
$<$<NOT:$<PLATFORM_ID:Darwin>>:Foundation>)
add_test(NAME SwiftAtomics
COMMAND AtomicsTestBundle)