Files
swift-argument-parser/Examples/CMakeLists.txt
Saleem Abdulrasool b054991507 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 <compnerd@compnerd.org>
2022-03-16 07:49:48 -05:00

21 lines
472 B
CMake

add_executable(math
math/Math.swift)
target_compile_options(math PRIVATE
-parse-as-library)
target_link_libraries(math PRIVATE
ArgumentParser
$<$<STREQUAL:${CMAKE_SYSTEM_NAME},Linux>:m>)
add_executable(repeat
repeat/Repeat.swift)
target_compile_options(repeat PRIVATE
-parse-as-library)
target_link_libraries(repeat PRIVATE
ArgumentParser)
add_executable(roll
roll/main.swift
roll/SplitMix64.swift)
target_link_libraries(roll PRIVATE
ArgumentParser)