-
-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use CLI11 command line parser library
This switches parsing of command line arguments from getopt to the CLI11 library. Its adds CLI11 as a new dependency. With this commit CLI11 is vendored in in the contrib directory, because it is not available in Ubuntu 20.04 and Debian before Bookworm. It is available in Ubuntu 22.04 und Debian Bookworm and it is available in Homebrew and as vcpkg. So a bit down the line we can switch to the versions available from the OS distribution. For Windows we don't need the getopt version from alex85k any more and this commit also removes that code from the Github action setup. This commit is quite large, because we have to change everything at the same time. Changes are for osm2pgsql and osm2pgsql-gen which now share part of the option parsing code (database and logging options), in the new src/command-line-app.[ch]pp files. The code tries to keep the functionality the same as much as possible. So no extra checks on command line options or so, these can come later. There are some unavoidable changes: * Some error messages have changed * Help output is now generated by the CLI11 library so it looks very different. There is no verbose help version any more. All command line options are shown with --help, but some with a bit less detail than before. But all the detail is in the man page anyway. * CLI11 can not parse an empty option parameter, so something like "--foo=" does not work, it tries to use the next option as value for the option. This is not very relevant in the real world, but there might be some corner cases where this changes behaviour. See #142
- Loading branch information
Showing
38 changed files
with
12,779 additions
and
726 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,25 @@ | ||
CLI11 2.2 Copyright (c) 2017-2023 University of Cincinnati, developed by Henry | ||
Schreiner under NSF AWARD 1414736. All rights reserved. | ||
|
||
Redistribution and use in source and binary forms of CLI11, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
3. Neither the name of the copyright holder nor the names of its contributors | ||
may be used to endorse or promote products derived from this software without | ||
specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,2 @@ | ||
Source: https://github.com/CLIUtils/CLI11 | ||
Revision: v2.3.2 |
Oops, something went wrong.