Skip to content

Commit 4ddab33

Browse files
committed
Adding a error if json requested but missing
1 parent 4974afb commit 4ddab33

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
CLI11 provides all the features you expect in a powerful command line parser, with a beautiful, minimal syntax and no dependencies beyond C++11. It is header only, and comes in a single file form for easy inclusion in projects. It is easy to use for small projects, but powerful enough for complex command line projects, and can be customized for frameworks.
1919
It is tested on [Travis] and [AppVeyor], and is being included in the [GooFit GPU fitting framework][GooFit]. It was inspired by [`plumbum.cli`][Plumbum] for Python. CLI11 has a user friendly introduction in this README, a more in-depth tutorial [GitBook], as well as [API documentation][api-docs] generated by Travis.
20-
See the [changelog](./CHANGELOG.md) or [GitHub Releases] for details for current and past releases. Also see the [Version 1.0 post] and [Version 1.3 post] for more information.
20+
See the [changelog](./CHANGELOG.md) or [GitHub Releases] for details for current and past releases. Also see the [Version 1.0 post], [Version 1.3 post], or [[Version 1.6 post] for more information.
2121

2222
You can be notified when new releases are made by subscribing to https://github.com/CLIUtils/CLI11/releases.atom on an RSS reader, like Feedly.
2323

@@ -462,6 +462,7 @@ CLI11 was developed at the [University of Cincinnati] to support of the [GooFit]
462462
[Clara]: https://github.com/philsquared/Clara
463463
[Version 1.0 post]: https://iscinumpy.gitlab.io/post/announcing-cli11-10/
464464
[Version 1.3 post]: https://iscinumpy.gitlab.io/post/announcing-cli11-13/
465+
[Version 1.6 post]: https://iscinumpy.gitlab.io/post/announcing-cli11-16/
465466
[wandbox-badge]: https://img.shields.io/badge/try-online-blue.svg
466467
[wandbox-link]: https://wandbox.org/permlink/Z4uwGhnhD2wm2r7Z
467468
[releases-badge]: https://img.shields.io/github/release/CLIUtils/CLI11.svg

examples/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ endfunction()
1616

1717
option(CLI11_EXAMPLE_JSON OFF)
1818
if(CLI11_EXAMPLE_JSON)
19+
if(NOT EXISTS "${CLI11_SOURCE_DIR}/extern/json/single_include/nlohmann/json.hpp")
20+
message(ERROR "You are missing the json package for CLI11_EXAMPLE_JSON. Please update your submodules (git submodule update --init)")
21+
endif()
1922
if(CMAKE_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
2023
message(WARNING "The json example requires GCC 4.9+ (requirement on json library)")
2124
endif()
2225
add_cli_exe(json json.cpp)
23-
target_include_directories(json PUBLIC SYSTEM ../extern/json/single_include)
26+
target_include_directories(json PUBLIC SYSTEM "${CLI11_SOURCE_DIR}/extern/json/single_include")
2427

2528
add_test(NAME json_config_out COMMAND json --item 2)
2629
set_property(TEST json_config_out PROPERTY PASS_REGULAR_EXPRESSION

0 commit comments

Comments
 (0)