#[[
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
  autogenerated/AtomicBool.swift
  autogenerated/AtomicLazyReference.swift
  autogenerated/HighLevelTypes.swift
  autogenerated/IntegerConformances.swift
  autogenerated/PointerConformances.swift
  autogenerated/Primitives.native.swift
  autogenerated/Primitives.shims.swift
  AtomicInteger.swift
  AtomicMemoryOrderings.swift
  AtomicOptional.swift
  AtomicOptionalRawRepresentable.swift
  AtomicRawRepresentable.swift
  AtomicStrongReference.swift
  AtomicValue.swift
  DoubleWord.swift
  "Unmanaged extensions.swift")
set_target_properties(Atomics PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
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)
