-
Notifications
You must be signed in to change notification settings - Fork 52
/
CMakeLists.txt
45 lines (40 loc) · 1.64 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#[[
This source file is part of the Swift Atomics Open Source Project
Copyright (c) 2021 - 2023 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
#]]
add_library(Atomics
"Types/UnsafeAtomicLazyReference.swift"
"Types/DoubleWord.swift"
"Types/ManagedAtomic.swift"
"Types/ManagedAtomicLazyReference.swift"
"Types/AtomicMemoryOrderings.swift"
"Types/UnsafeAtomic.swift"
"Types/autogenerated/IntegerOperations.swift"
"Unmanaged extensions.swift"
"Primitives/autogenerated/Primitives.native.swift"
"Primitives/autogenerated/Primitives.shims.swift"
"Conformances/RawRepresentable.swift"
"Conformances/OptionalRawRepresentable.swift"
"Conformances/autogenerated/IntegerConformances.swift"
"Conformances/autogenerated/PointerConformances.swift"
"Conformances/autogenerated/AtomicBool.swift"
"Protocols/AtomicInteger.swift"
"Protocols/AtomicValue.swift"
"Protocols/AtomicReference.swift"
"Protocols/AtomicOptionalWrappable.swift"
"Protocols/AtomicStorage.swift")
set_target_properties(Atomics PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
target_compile_options(Atomics PUBLIC
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:${ATOMICS_SWIFT_FLAGS}>"
"$<$<COMPILE_LANGUAGE:C,CXX>:SHELL:${ATOMICS_C_FLAGS}>")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
target_compile_options(Atomics PUBLIC
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -mcx16>")
endif()
target_link_libraries(Atomics PUBLIC
_AtomicsShims)
_install_target(Atomics)
set_property(GLOBAL APPEND PROPERTY SWIFT_ATOMICS_EXPORTS Atomics)