-
Notifications
You must be signed in to change notification settings - Fork 336
Add support to CMake to build swift-argument-parser during SwiftPM bootstrapping #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc @compnerd ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good except for the unnecessary compatibility.
CMakeLists.txt
Outdated
|
||
include(CTest) | ||
|
||
if(CMAKE_VERSION VERSION_LESS 3.16 AND CMAKE_SYSTEM_NAME STREQUAL Windows) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? The minimum for this project is currently 3.16. I think that we can ignore the <3.16 compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, this was unnecessary, I dropped it
Sources/CMakeLists.txt
Outdated
@@ -2,3 +2,9 @@ add_subdirectory(ArgumentParser) | |||
if(BUILD_TESTING) | |||
add_subdirectory(ArgumentParserTestHelpers) | |||
endif() | |||
|
|||
set_property(GLOBAL APPEND PROPERTY ARGUMENTPARSER_EXPORTS ArgumentParser) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use ArgumentParser_EXPORTS but, that’s a purely style thing, it has 0 bearing on anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know, I'm not that familiar with CMake style conventions. I updated it since I was already making changes
@compnerd thanks for reviewing! |
@swift-ci Please test |
@owenv my pleasure! |
@swift-ci Please test |
This is a fairly early attempt at integrating this repo into the SwiftPM bootstrapped build, someone better at CMake than I am should probably review :)