File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,14 @@ endif()
23
23
24
24
include (SwiftSupport )
25
25
include (GNUInstallDirs )
26
+ include (CheckLinkerFlag )
27
+
28
+ if (CMAKE_SYSTEM_NAME STREQUAL Linux
29
+ OR CMAKE_SYSTEM_NAME STREQUAL FreeBSD
30
+ OR CMAKE_SYSTEM_NAME STREQUAL OpenBSD )
31
+ enable_language (C )
32
+ check_linker_flag (C "LINKER:--build-id=sha1" LINKER_SUPPORTS_BUILD_ID )
33
+ endif ()
26
34
27
35
add_library (XCTest
28
36
Sources /XCTest/Private/WallClockTimeMetric.swift
@@ -79,6 +87,10 @@ set_target_properties(XCTest PROPERTIES
79
87
Swift_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /swift
80
88
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR} /swift )
81
89
90
+ if (LINKER_SUPPORTS_BUILD_ID )
91
+ target_link_options (XCTest PRIVATE "LINKER:--build-id=sha1" )
92
+ endif ()
93
+
82
94
83
95
if (ENABLE_TESTING )
84
96
enable_testing ()
You can’t perform that action at this time.
0 commit comments