mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-01 05:03:52 +00:00
This series cleans up and modernizes the Meson code a bit: - It adds the license SPDX name to the proper field - Sets a minimum version, the version is fairly old, but without setting a version then Meson will never warn about issues, including potentially important ones like "this happens to work in some cases but wasn't intended and doesn't work in all cases" - uses more modern Meson features to make things easier for consumers - Fixes the tests using the ensure_utf8 helpers by ensuring that they're actually built, and placing them in the correct path. - Adds the Meson test to the CI
28 lines
815 B
Meson
28 lines
815 B
Meson
project('CLI11', ['cpp'],
|
|
version : run_command(find_program('scripts/ExtractVersion.py'), check: true).stdout().strip(),
|
|
license : 'BSD-3-clause',
|
|
meson_version : '>= 0.60',
|
|
default_options : ['cpp_std=c++11', 'warning_level=3']
|
|
)
|
|
|
|
cxx = meson.get_compiler('cpp')
|
|
|
|
CLI11_inc = include_directories(['include'])
|
|
|
|
CLI11_dep = declare_dependency(
|
|
include_directories : CLI11_inc,
|
|
version : meson.project_version(),
|
|
)
|
|
|
|
meson.override_dependency('CLI11', CLI11_dep)
|
|
|
|
if get_option('tests')
|
|
warnings = ['-Wshadow', '-Wsign-conversion', '-Wswitch-enum']
|
|
if cxx.get_id() == 'gcc' and cxx.version().version_compare('>=4.9')
|
|
warnings += '-Weffc++'
|
|
endif
|
|
add_project_arguments(cxx.get_supported_arguments(warnings), language: 'cpp')
|
|
|
|
subdir('tests')
|
|
endif
|