Files
osm2pgsql/contrib
Jochen Topf 482719e541 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
2023-12-22 10:10:44 +01:00
..
2023-11-01 13:50:33 +01:00