Skip to content

Commit 0923343

Browse files
committed
[CMake] Fix build with SwiftTesting_BuildMacrosAsExecutables option set
There were two issues: - typo -load-plugin-exectuable -> -load-plugin-executable - The executable target for TestingMacros was not installed Resolves #644
1 parent 133e302 commit 0923343

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Sources/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ elseif(SwiftTesting_MACRO_PATH)
9797
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-load-plugin-library ${SwiftTesting_MACRO_PATH}>")
9898
else()
9999
message(STATUS "TestingMacros: ${SwiftTesting_MACRO_PATH} (executable)")
100-
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-load-plugin-exectuable ${SwiftTesting_MACRO_PATH}#TestingMacros>")
100+
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-load-plugin-executable ${SwiftTesting_MACRO_PATH}#TestingMacros>")
101101
endif()
102102
endif()
103103

Sources/TestingMacros/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ if(SwiftTesting_BuildMacrosAsExecutables)
5656

5757
# Include the .swift file which contains its `@main` entry point type.
5858
target_compile_definitions(TestingMacros PRIVATE SWT_NO_LIBRARY_MACRO_PLUGINS)
59+
60+
install(TARGETS TestingMacros
61+
RUNTIME DESTINATION bin)
5962
else()
6063
add_library(TestingMacros SHARED)
6164

0 commit comments

Comments
 (0)