Skip to content

Commit 3fb735a

Browse files
authored
update meson dependencies (#508)
- updates fallback gtest to 1.15.2 - updates fallback sqlite3 to 3.49.2 - adds additional checks of the default c++ standard version if GTest is >= 1.17.0 - bumps the version to 3.3.3
2 parents 9470b72 + 24085d4 commit 3fb735a

File tree

2 files changed

+32
-24
lines changed

2 files changed

+32
-24
lines changed

meson.build

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ project(
44
# however newer versions of gtest requires C++14
55
default_options: ['cpp_std=c++14', 'warning_level=3'],
66
license: 'MIT',
7-
version: '3.3.2',
7+
version: '3.3.3',
88
)
99

1010
cxx = meson.get_compiler('cpp')
11+
cpp_std = get_option('cpp_std')
1112

1213
## at best we might try to test if this code compiles
1314
## testing for compilers or platforms is not reliable enough
@@ -91,11 +92,12 @@ sqlitecpp_test_args = []
9192
## 'auto' return without trailing return type; deduced return types are a C++14 extension
9293
if host_machine.system() == 'windows'
9394
## check if the std version is less than c++14
94-
if get_option('cpp_std').endswith('11')
95-
message('[WINDOWS] using c++14 standard')
96-
message('[WINDOWS] you can disable this warning by setting cpp_std to c++14 or newer')
95+
if cpp_std.version_compare('<c++14')
96+
message('[WINDOWS] setting minimal version to c++14')
97+
message('[WINDOWS] you can disable this warning by setting cpp_std to c++14 or newer.')
98+
cpp_std = 'c++14'
9799
sqlitecpp_opts += [
98-
'cpp_std=c++14',
100+
'cpp_std=' + cpp_std,
99101
]
100102
endif
101103
endif
@@ -277,16 +279,22 @@ if get_option('SQLITECPP_BUILD_TESTS')
277279
'gtest',
278280
main : true,
279281
fallback: ['gtest', 'gtest_main_dep'])
280-
# check if Gtest is newer than 1.14.0
281-
# if so set the minimum standard to c++14
282-
if gtest_dep.found() and gtest_dep.version().version_compare('>=1.14.0')
283-
## check if the std version is less than c++14
284-
if get_option('cpp_std').version_compare('<c++14')
285-
message('warning: current Gtest version requires c++14, setting the minimum standard to c++14')
286-
message('warning: you can disable this warning by setting cpp_std to c++14 or newer')
287-
288-
sqlitecpp_test_args += [
289-
'cpp_std=c++14',
282+
# check for the current version of gtest as newer versions require newer C++ standards
283+
if gtest_dep.found()
284+
gtest_version = gtest_dep.version()
285+
minimum_standard = 'none'
286+
required_std_format = 'current Gtest version requires at least @0@, setting the minimum standard to @0@. You can disable this warning by setting cpp_std to @0@ or newer.'
287+
## gtest 1.17.0 requires c++17 while gtest 1.14.0 requires c++14
288+
if gtest_version.version_compare('>=1.17.0') and cpp_std.version_compare('<c++17')
289+
minimum_standard = 'c++17'
290+
elif gtest_version.version_compare('>=1.14.0') and cpp_std.version_compare('<c++14')
291+
minimum_standard = 'c++14'
292+
endif
293+
if minimum_standard != 'none'
294+
warning(required_std_format.format(minimum_standard))
295+
cpp_std = minimum_standard
296+
sqlitecpp_opts += [
297+
'cpp_std=' + cpp_std,
290298
]
291299
endif
292300
endif

subprojects/sqlite3.wrap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[wrap-file]
2-
directory = sqlite-amalgamation-3460100
3-
source_url = https://www.sqlite.org/2024/sqlite-amalgamation-3460100.zip
4-
source_filename = sqlite-amalgamation-3460100.zip
5-
source_hash = 77823cb110929c2bcb0f5d48e4833b5c59a8a6e40cdea3936b99e199dbbe5784
6-
patch_filename = sqlite3_3.46.1-1_patch.zip
7-
patch_url = https://wrapdb.mesonbuild.com/v2/sqlite3_3.46.1-1/get_patch
8-
patch_hash = 1358b931e30a454e55dbedbc28d5844946a17c68b45a5333093152d7af75982b
9-
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sqlite3_3.46.1-1/sqlite-amalgamation-3460100.zip
10-
wrapdb_version = 3.46.1-1
2+
directory = sqlite-amalgamation-3490200
3+
source_url = https://www.sqlite.org/2025/sqlite-amalgamation-3490200.zip
4+
source_filename = sqlite-amalgamation-3490200.zip
5+
source_hash = 921fc725517a694df7df38a2a3dfede6684024b5788d9de464187c612afb5918
6+
patch_filename = sqlite3_3.49.2-1_patch.zip
7+
patch_url = https://wrapdb.mesonbuild.com/v2/sqlite3_3.49.2-1/get_patch
8+
patch_hash = e3eef046409329c5c1ca8308255caa2266710fc1b9d8695fdedd04cebe42a690
9+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sqlite3_3.49.2-1/sqlite-amalgamation-3490200.zip
10+
wrapdb_version = 3.49.2-1
1111

1212
[provide]
1313
sqlite3 = sqlite3_dep

0 commit comments

Comments
 (0)