forked from apple/swift-argument-parser
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: repair the build of ArgumentParser with CMake
The changes in apple#335 introduced a new library but failed to actually build the library and update the dependency structure. Update the build system to build and install the new target.
- Loading branch information
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
add_library(ArgumentParserToolInfo | ||
ToolInfo.swift) | ||
# NOTE: workaround for CMake not setting up include flags yet | ||
set_target_properties(ArgumentParserToolInfo PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) | ||
target_compile_options(ArgumentParserToolInfo PRIVATE | ||
$<$<BOOL:${BUILD_TESTING}>:-enable-testing>) | ||
|
||
|
||
_install_target(ArgumentParserToolInfo) | ||
set_property(GLOBAL APPEND PROPERTY ArgumentParser_EXPORTS ArgumentParserToolInfo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
add_subdirectory(ArgumentParser) | ||
add_subdirectory(ArgumentParserToolInfo) | ||
if(BUILD_TESTING) | ||
add_subdirectory(ArgumentParserTestHelpers) | ||
endif() |