Skip to content

Commit b054991

Browse files
authored
build: complete the changes from #423 (#425)
This adds `-parse-as-library` to the example targets which use `@main` resulting in a compile failure as `@main` is not processed unless the target is marked as library. Authored-by: Saleem Abdulrasool <[email protected]>
1 parent 777930b commit b054991

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Examples/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
add_executable(math
22
math/Math.swift)
3+
target_compile_options(math PRIVATE
4+
-parse-as-library)
35
target_link_libraries(math PRIVATE
46
ArgumentParser
57
$<$<STREQUAL:${CMAKE_SYSTEM_NAME},Linux>:m>)
68

79
add_executable(repeat
810
repeat/Repeat.swift)
11+
target_compile_options(repeat PRIVATE
12+
-parse-as-library)
913
target_link_libraries(repeat PRIVATE
1014
ArgumentParser)
1115

0 commit comments

Comments
 (0)