Skip to content

Commit 583f3c8

Browse files
yaml-cpp: clean-up meson build files
1 parent 8be800c commit 583f3c8

File tree

3 files changed

+10
-36
lines changed

3 files changed

+10
-36
lines changed

releases.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4623,6 +4623,7 @@
46234623
"yaml-cpp"
46244624
],
46254625
"versions": [
4626+
"0.8.0-2",
46264627
"0.8.0-1"
46274628
]
46284629
},

subprojects/packagefiles/yaml-cpp/meson.build

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,31 @@ project(
22
'yaml-cpp',
33
'cpp',
44
version: '0.8.0',
5-
meson_version: '>=0.63.0',
5+
meson_version: '>=0.59.0',
66
default_options: ['cpp_std=c++11'],
77
license: 'MIT',
88
)
99

1010
inc = include_directories('include')
11-
subdir('src')
1211
yaml_cpp_private_inc = include_directories('include', 'src')
1312

14-
project_version_split = meson.project_version().split('.')
13+
subdir('src')
14+
1515
lib_cpp_args = []
1616
cc = meson.get_compiler('cpp')
1717
if cc.has_multi_arguments('-include', 'cstdint')
1818
lib_cpp_args += ['-include', 'cstdint']
1919
endif
20-
if not meson.is_subproject()
21-
lib_cpp_args += cc.get_supported_arguments(
22-
'-Wall',
23-
'-Wextra',
24-
'-Wshadow',
25-
'-Weffc++',
26-
'-Wno-long-long',
27-
'-pedantic',
28-
'-pedantic-errors',
29-
)
30-
endif
3120

3221
compile_args = []
3322
if get_option('default_library') == 'static'
3423
compile_args += ['-DYAML_CPP_STATIC_DEFINE']
3524
else
3625
lib_cpp_args += ['-Dyaml_cpp_EXPORTS']
3726
endif
27+
28+
project_version_split = meson.project_version().split('.')
29+
3830
yaml_cpp_lib = library(
3931
'yaml-cpp',
4032
src,
@@ -58,16 +50,3 @@ tests_feature = get_option('tests').disable_auto_if(meson.is_subproject())
5850
if tests_feature.allowed()
5951
subdir('test')
6052
endif
61-
62-
if not meson.is_subproject()
63-
clang_format_prog = find_program(
64-
'clang-format',
65-
required: false,
66-
)
67-
if clang_format_prog.found()
68-
run_target(
69-
'format',
70-
command: [clang_format_prog, '--style=file', '-i', src],
71-
)
72-
endif
73-
endif

subprojects/packagefiles/yaml-cpp/test/meson.build

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,10 @@ tests_src = files(
5454
'regex_test.cpp',
5555
)
5656

57-
test_exe = executable(
57+
yaml_cpp_tests_exe = executable(
5858
'yaml-cpp-tests',
5959
tests_src,
60-
cpp_args: cc.get_supported_arguments(
61-
'-Wno-variadic-macros',
62-
'-Wno-sign-compare',
63-
'-Wno-c99-extensions',
64-
),
65-
link_with: yaml_cpp_lib,
6660
include_directories: yaml_cpp_private_inc,
67-
dependencies: [gmock_dep],
61+
dependencies: [yaml_cpp_dep, gmock_dep],
6862
)
69-
test('tests', test_exe)
63+
test('yaml-cpp-tests', yaml_cpp_tests_exe)

0 commit comments

Comments
 (0)