代码拉取完成,页面将自动刷新
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')
use_single_header = get_option('single-file-header')
use_precompiled = get_option('precompiled')
if use_precompiled and use_single_header
error('Options "single-file"header" and "precompiled" are mutually exclusive')
endif
cli11_headers = files(
'include/CLI/App.hpp',
'include/CLI/Argv.hpp',
'include/CLI/CLI.hpp',
'include/CLI/Config.hpp',
'include/CLI/ConfigFwd.hpp',
'include/CLI/Encoding.hpp',
'include/CLI/Error.hpp',
'include/CLI/Formatter.hpp',
'include/CLI/FormatterFwd.hpp',
'include/CLI/Macros.hpp',
'include/CLI/Option.hpp',
'include/CLI/Split.hpp',
'include/CLI/StringTools.hpp',
'include/CLI/TypeTools.hpp',
'include/CLI/Validators.hpp',
'include/CLI/Version.hpp',
)
cli11_impl_headers = files(
'include/CLI/impl/App_inl.hpp',
'include/CLI/impl/Argv_inl.hpp',
'include/CLI/impl/Config_inl.hpp',
'include/CLI/impl/Encoding_inl.hpp',
'include/CLI/impl/Formatter_inl.hpp',
'include/CLI/impl/Option_inl.hpp',
'include/CLI/impl/Split_inl.hpp',
'include/CLI/impl/StringTools_inl.hpp',
'include/CLI/impl/Validators_inl.hpp',
)
subdir('single-include')
CLI11_inc = include_directories(['include'])
warnings = ['-Wshadow', '-Wsign-conversion', '-Wswitch-enum']
if cxx.get_id() == 'gcc' and cxx.version().version_compare('>=4.9')
warnings += '-Weffc++'
endif
if cxx.get_id() == 'clang'
warnings += [
'-Wcast-align',
'-Wimplicit-atomic-properties',
'-Wmissing-declarations',
'-Woverlength-strings',
'-Wstrict-selector-match',
'-Wundeclared-selector',
]
endif
add_project_arguments(cxx.get_supported_arguments(warnings), language: 'cpp')
if use_precompiled
libcli11 = static_library(
'CLI11',
'src/Precompile.cpp',
include_directories : CLI11_inc,
cpp_args : ['-DCLI11_COMPILE'],
)
else
libcli11 = []
endif
CLI11_dep = declare_dependency(
sources : single_header,
link_with : libcli11,
include_directories : CLI11_inc,
version : meson.project_version(),
)
meson.override_dependency('CLI11', CLI11_dep)
if get_option('tests')
subdir('tests')
endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。