mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-30 20:53:52 +00:00
* meson: add support for testsuite * meson: fix deprecation warning for run_command with unchecked return code This would implicitly default to false, so if something bizarre happened and the command errored out, meson would consider that fine. Now meson emits a warning about this deprecated legacy behavior, suggests that it will eventually change, and, most importantly, prevents a warning-free build. Suppress the warning by manually specifying the sensible behavior, which is to fail on errors. * meson: download catch2 on demand if a system version is unavailable Produced by running `meson wrap install catch2` and checking the results into git. No modifications to the build files are expected; this makes use of https://mesonbuild.com/Wrap-dependency-system-manual.html#provide-section * style: pre-commit.ci fixes * ci: add meson build to the CI * ci: meson doesn't depend on ninja or or have a ninja extra * ci: minor cleanup to Meson job Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
24 lines
701 B
Meson
24 lines
701 B
Meson
project('CLI11', ['cpp'],
|
|
version : run_command(find_program('scripts/ExtractVersion.py'), check: true).stdout().strip(),
|
|
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(),
|
|
)
|
|
|
|
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
|