Skip to content

Commit 5a8fbec

Browse files
committed
[cmake] Create a GenerateTestFixtures targets in CMake.
The target reproduces the basic structure of the Xcode project and allows other platforms to build easily and test. The target is not installed intentionally. It is supposed to be a development tool.
1 parent 8604016 commit 5a8fbec

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,28 @@ add_swift_executable(plutil
426426
Foundation
427427
CoreFoundation)
428428

429+
add_swift_executable(GenerateTestFixtures
430+
SOURCES
431+
Tools/GenerateTestFixtures/GenerateTestFixtures/main.swift
432+
Tools/GenerateTestFixtures/GenerateTestFixtures/Utilities.swift
433+
TestFoundation/FixtureValues.swift
434+
TARGET
435+
${CMAKE_C_COMPILER_TARGET}
436+
LINK_FLAGS
437+
${libdispatch_ldflags}
438+
-L${CMAKE_CURRENT_BINARY_DIR}
439+
-lFoundation
440+
${Foundation_INTERFACE_LIBRARIES}
441+
SWIFT_FLAGS
442+
-Xcc -F${CMAKE_CURRENT_BINARY_DIR}
443+
-I;${CMAKE_CURRENT_BINARY_DIR}/swift
444+
-I;${ICU_INCLUDE_DIR}
445+
${libdispatch_cflags}
446+
$<$<NOT:$<CONFIG:Debug>>:-O>
447+
${swift_libc_flags}
448+
DEPENDS
449+
Foundation)
450+
429451
if(ENABLE_TESTING)
430452
add_swift_executable(xdgTestHelper
431453
TARGET

0 commit comments

Comments
 (0)