diff --git a/ci_config.json b/ci_config.json index 41892cade9..1359fa69f5 100644 --- a/ci_config.json +++ b/ci_config.json @@ -1333,6 +1333,13 @@ "rang": { "ignore_upstream_meson": "3.2" }, + "range-v3": { + "_comment": "c++17 is required when using Visual Studio", + "build_options": [ + "range-v3:cpp_std=c++17", + "range-v3:tests=enabled" + ] + }, "rdkafka": { "_comment": "- broken CI finds bad version of OpenSSL on Windows", "build_options": [ diff --git a/releases.json b/releases.json index 524d7e712e..54de4e375b 100644 --- a/releases.json +++ b/releases.json @@ -3833,6 +3833,7 @@ "range-v3" ], "versions": [ + "0.12.0-3", "0.12.0-2", "0.12.0-1", "0.11.0-1", diff --git a/subprojects/packagefiles/range-v3/meson.build b/subprojects/packagefiles/range-v3/meson.build index b0240a54ef..e4358c6109 100644 --- a/subprojects/packagefiles/range-v3/meson.build +++ b/subprojects/packagefiles/range-v3/meson.build @@ -2,13 +2,25 @@ project( 'range-v3', 'cpp', version: '0.12.0', - license: 'Boost, libc++, Stepanov and McJones "Elements of Programming", SGI STL', + meson_version: '>=0.59.0', + license: 'BSL-1.0 and NCSA and MIT and Stepanov McJones Elements of Programming and SGI STL', ) +if meson.get_compiler('cpp').get_argument_syntax() == 'msvc' + add_project_arguments( + '/permissive-', + '-fno-delayed-template-parsing', + language: 'cpp', + ) +endif + range_inc = include_directories('include') range_dep = declare_dependency( include_directories: range_inc, ) +meson.override_dependency('range-v3', range_dep) -subdir('test') +if get_option('tests').disable_auto_if(meson.is_subproject()).allowed() + subdir('test') +endif diff --git a/subprojects/packagefiles/range-v3/meson_options.txt b/subprojects/packagefiles/range-v3/meson_options.txt new file mode 100644 index 0000000000..25dd129f6b --- /dev/null +++ b/subprojects/packagefiles/range-v3/meson_options.txt @@ -0,0 +1,5 @@ +option( + 'tests', + type: 'feature', + description: 'Build test programs', +) diff --git a/subprojects/packagefiles/range-v3/test/action/meson.build b/subprojects/packagefiles/range-v3/test/action/meson.build index 0a95f7de21..0c0e1eedc3 100644 --- a/subprojects/packagefiles/range-v3/test/action/meson.build +++ b/subprojects/packagefiles/range-v3/test/action/meson.build @@ -1,19 +1,19 @@ action_test = { - 'act.concepts' : files('cont_concepts.cpp'), - 'act.adjacent_remove_if' : files('adjacent_remove_if.cpp'), - 'act.drop' : files('drop.cpp'), - 'act.drop_while' : files('drop_while.cpp'), - 'act.insert' : files('insert.cpp'), - 'act.join' : files('join.cpp'), - 'act.push_front' : files('push_front.cpp'), - 'act.push_back' : files('push_back.cpp'), - 'act.remove_if' : files('remove_if.cpp'), - 'act.remove' : files('remove.cpp'), - 'act.unstable_remove_if' : files('unstable_remove_if.cpp'), - 'act.reverse' : files('reverse.cpp'), - 'act.shuffle' : files('shuffle.cpp'), - 'act.slice' : files('slice.cpp'), - 'act.sort' : files('sort.cpp'), + 'act.concepts': files('cont_concepts.cpp'), + 'act.adjacent_remove_if': files('adjacent_remove_if.cpp'), + 'act.drop': files('drop.cpp'), + 'act.drop_while': files('drop_while.cpp'), + 'act.insert': files('insert.cpp'), + 'act.join': files('join.cpp'), + 'act.push_front': files('push_front.cpp'), + 'act.push_back': files('push_back.cpp'), + 'act.remove_if': files('remove_if.cpp'), + 'act.remove': files('remove.cpp'), + 'act.unstable_remove_if': files('unstable_remove_if.cpp'), + 'act.reverse': files('reverse.cpp'), + 'act.shuffle': files('shuffle.cpp'), + 'act.slice': files('slice.cpp'), + 'act.sort': files('sort.cpp'), 'act.split': files('split.cpp'), 'act.stable_sort': files('stable_sort.cpp'), 'act.stride': files('stride.cpp'), diff --git a/subprojects/packagefiles/range-v3/test/experimental/view/meson.build b/subprojects/packagefiles/range-v3/test/experimental/view/meson.build index 4cf17a2b3e..564a77fc5e 100644 --- a/subprojects/packagefiles/range-v3/test/experimental/view/meson.build +++ b/subprojects/packagefiles/range-v3/test/experimental/view/meson.build @@ -1,5 +1,5 @@ experimental_view_test = { - 'view.shared' : files('shared.cpp'), + 'view.shared': files('shared.cpp'), } foreach name, sources : experimental_view_test diff --git a/subprojects/packagefiles/range-v3/test/functional/meson.build b/subprojects/packagefiles/range-v3/test/functional/meson.build index 6c32cb26e0..9508f5d3c1 100644 --- a/subprojects/packagefiles/range-v3/test/functional/meson.build +++ b/subprojects/packagefiles/range-v3/test/functional/meson.build @@ -1,6 +1,6 @@ functional_test = { - 'fun.bind_back' : files('bind_back.cpp'), - 'fun.on' : files('on.cpp'), + 'fun.bind_back': files('bind_back.cpp'), + 'fun.on': files('on.cpp'), } foreach name, sources : functional_test diff --git a/subprojects/packagefiles/range-v3/test/meson.build b/subprojects/packagefiles/range-v3/test/meson.build index fdc1c0a432..5624f7584f 100644 --- a/subprojects/packagefiles/range-v3/test/meson.build +++ b/subprojects/packagefiles/range-v3/test/meson.build @@ -10,10 +10,10 @@ subdir('experimental') general_test = { 'config': files('config.cpp'), - 'constexpr_core' : files('constexpr_core.cpp'), - 'multiple' : files('multiple1.cpp', 'multiple2.cpp'), - 'bug474' : files('bug474.cpp'), - 'bug566' : files('bug566.cpp'), + 'constexpr_core': files('constexpr_core.cpp'), + 'multiple': files('multiple1.cpp', 'multiple2.cpp'), + 'bug474': files('bug474.cpp'), + 'bug566': files('bug566.cpp'), 'bug1322': files('bug1322.cpp'), 'bug1335': files('bug1335.cpp'), 'bug1633': files('bug1633.cpp'), diff --git a/subprojects/range-v3.wrap b/subprojects/range-v3.wrap index 90213c4255..7139af73ad 100644 --- a/subprojects/range-v3.wrap +++ b/subprojects/range-v3.wrap @@ -6,4 +6,4 @@ source_hash = 015adb2300a98edfceaf0725beec3337f542af4915cec4d0b89fa0886f4ba9cb patch_directory = range-v3 [provide] -range-v3 = range_dep +dependency_names = range-v3 diff --git a/tools/sanity_checks.py b/tools/sanity_checks.py index 066cbfc2d3..4441daa161 100755 --- a/tools/sanity_checks.py +++ b/tools/sanity_checks.py @@ -30,6 +30,7 @@ import tarfile import textwrap import zipfile +import warnings from pathlib import Path from utils import CIConfig, ProjectCIConfig, Releases, Version, ci_group, is_ci, is_alpinelike, is_debianlike, is_macos, is_windows, is_msys, read_wrap, FormattingError, format_meson, format_wrap @@ -688,9 +689,12 @@ def check_project_args(self, name: str, wrap: configparser.ConfigParser) -> None print('\nno license_expression library; skipping SPDX validation') else: try: - license_expression.get_spdx_licensing().parse( - project['license'], validate=True, strict=True - ) + licensing = license_expression.get_spdx_licensing() + expression = licensing.parse(project['license'], strict=True) + unknown_license_keys = licensing.unknown_license_keys(expression) + if unknown_license_keys: + msg = f"Unknown license key(s): {', '.join(unknown_license_keys)}" + warnings.warn(msg) except license_expression.ExpressionParseError as exc: raise Exception('Invalid license expression; see https://spdx.github.io/spdx-spec/v3.0.1/annexes/spdx-license-expressions/') from exc except license_expression.ExpressionError as exc: