-
Notifications
You must be signed in to change notification settings - Fork 145
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
36 lines (32 loc) · 1.35 KB
/
CMakeLists.txt
File metadata and controls
36 lines (32 loc) · 1.35 KB
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
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2025 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors
include(ModuleABIName)
add_library(_TestingInterop
FallbackEventHandler.cpp)
if("${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC" OR
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
target_compile_options(_TestingInternals PRIVATE
/EHa-c)
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_compile_options(_TestingInternals PRIVATE
-fno-exceptions -fPIC)
else()
target_compile_options(_TestingInternals PRIVATE
-fno-exceptions)
endif()
if(NOT BUILD_SHARED_LIBS)
# When building a static library, tell clients to autolink the internal
# libraries.
target_compile_options(_TestingInterop PRIVATE
"SHELL:-Xfrontend -public-autolink-library -Xfrontend _TestingInternals")
endif()
target_compile_options(_TestingInterop PRIVATE
-enable-library-evolution
-emit-module-interface -emit-module-interface-path $<TARGET_PROPERTY:_TestingInterop,Swift_MODULE_DIRECTORY>/_TestingInterop.swiftinterface)
_swift_testing_install_target(_TestingInterop)
set_property(GLOBAL APPEND PROPERTY SwiftTesting_EXPORTS _TestingInterop)