Skip to content

Commit

Permalink
[arg-router] Update to v1.2.0 (#29869)
Browse files Browse the repository at this point in the history
* [arg-router] Update to v1.2.0

Bug fixes
* Issue 254, passing no args to short_form_expander_t::pre_parse_phase(..) causes segfault
* Issue 255, policy_unique_from_owner_parent_to_mode_or_root not working

Improvements
* Corrected CMake package so you don't need to manually set the include directory anymore (Issue 257)
* Node can be instantiated with bare compile-time strings and they are automatically mapped to the appropriate policy (Issue 256)
* Improved help output formatting documentation (Issue 258)

* Removed invalid dependency from usage file

* Used CONFIG_PATH in vcpkg_cmake_config_fixup()

* Replaced lost newline
  • Loading branch information
cmannett85 authored Mar 2, 2023
1 parent 1840f03 commit e4040c6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
22 changes: 14 additions & 8 deletions ports/arg-router/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ vcpkg_from_github(
REPO cmannett85/arg_router
REF v${VERSION}
HEAD_REF main
SHA512 2951a54b4fb13abd10d4de3711d4d92f180e582c21e9a0d3599cb327e799727e826ea87aecd0fd7a6203585eac5a934afe25f98488ef6b36c12be97450ab8020
SHA512 69448b9343247679a7f288c4b69819df68ba8893d3537b2bdfedf77e2c4f8d39696c68f7716eda108810a7b951f2fec57d329d4113623edf2d28c55e3e68329f
)

set(VCPKG_BUILD_TYPE release) # header-only port
Expand All @@ -21,17 +21,23 @@ file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
)

file(COPY "${CURRENT_PACKAGES_DIR}/include/arg_router/arg_router-config.cmake"
"${CURRENT_PACKAGES_DIR}/include/arg_router/arg_router-config-version.cmake"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/arg_router"
)
set(CMAKE_FILE_DIR "lib/cmake/arg_router")
if (WIN32)
set(CMAKE_FILE_DIR "cmake")
elseif (APPLE)
set(CMAKE_FILE_DIR "arg_router.framework/Resources/CMake")
endif()

vcpkg_cmake_config_fixup(
PACKAGE_NAME arg_router
CONFIG_PATH "${CMAKE_FILE_DIR}"
)

file(REMOVE "${CURRENT_PACKAGES_DIR}/include/arg_router/arg_router-config.cmake"
"${CURRENT_PACKAGES_DIR}/include/arg_router/arg_router-config-version.cmake"
"${CURRENT_PACKAGES_DIR}/include/arg_router/LICENSE"
string(FIND "${CMAKE_FILE_DIR}" "/" CMAKE_FILE_DIR_SLASH_IDX)
string(SUBSTRING "${CMAKE_FILE_DIR}" 0 ${CMAKE_FILE_DIR_SLASH_IDX} CMAKE_FILE_DIR_ROOT)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/${CMAKE_FILE_DIR_ROOT}")

file(REMOVE "${CURRENT_PACKAGES_DIR}/include/arg_router/LICENSE"
"${CURRENT_PACKAGES_DIR}/include/arg_router/README.md"
)

2 changes: 1 addition & 1 deletion ports/arg-router/usage
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The package arg-router is a header-only library and so is typically used like this:

find_package(arg_router REQUIRED)
include_directories(SYSTEM "${arg_router_INCLUDE_DIRS}")
target_link_libraries(my_exe PUBLIC arg_router)

For more information, see the docs here:

Expand Down
2 changes: 1 addition & 1 deletion ports/arg-router/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arg-router",
"version": "1.1.1",
"version": "1.2.0",
"description": "C++ command line argument parsing and routing.",
"homepage": "https://github.com/cmannett85/arg_router",
"documentation": "https://cmannett85.github.io/arg_router/",
Expand Down
5 changes: 5 additions & 0 deletions versions/a-/arg-router.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2ad077ad64e854b417c0c85f5900528795bc2028",
"version": "1.2.0",
"port-version": 0
},
{
"git-tree": "3a12ba85bd70de2d9fdd55ecff2ee394d0ed1b79",
"version": "1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
"port-version": 2
},
"arg-router": {
"baseline": "1.1.1",
"baseline": "1.2.0",
"port-version": 0
},
"argagg": {
Expand Down

0 comments on commit e4040c6

Please sign in to comment.