From 8704db38b0321a44e5f080678c6860cccda65ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Guzm=C3=A1n?= Date: Mon, 28 Aug 2023 16:39:23 -0600 Subject: [PATCH] update Gtest to 1.14.0 --- meson.build | 32 ++++++++++++++++++++++++++------ subprojects/gtest.wrap | 17 +++++++++-------- subprojects/sqlite3.wrap | 17 +++++++++-------- subprojects/sqlitecpp.wrap | 8 -------- 4 files changed, 44 insertions(+), 30 deletions(-) delete mode 100644 subprojects/sqlitecpp.wrap diff --git a/meson.build b/meson.build index 24eeb731..7fb35d00 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,8 @@ project( 'SQLiteCpp', 'cpp', - # SQLiteCpp requires C++11 support - default_options: ['cpp_std=c++11', 'warning_level=3'], + # SQLiteCpp supports C++11 + # however newer versions of gtest requires C++14 + default_options: ['cpp_std=c++14', 'warning_level=3'], license: 'MIT', version: '3.3.1', ) @@ -97,10 +98,14 @@ sqlitecpp_sample2_srcs = files( ## using MSVC headers requires c++14, if not will show an error on xstddef as: ## 'auto' return without trailing return type; deduced return types are a C++14 extension if host_machine.system() == 'windows' - message('[WINDOWS] using c++14 standard') - sqlitecpp_opts += [ - 'cpp_std=c++14', - ] + ## check if the std version is less than c++14 + if get_option('cpp_std').endswith('11') + message('[WINDOWS] using c++14 standard') + message('[WINDOWS] you can disable this warning by setting cpp_std to c++14 or newer') + sqlitecpp_opts += [ + 'cpp_std=c++14', + ] + endif endif # Options relative to SQLite and SQLiteC++ functions @@ -280,6 +285,21 @@ if get_option('SQLITECPP_BUILD_TESTS') 'gtest', main : true, fallback: ['gtest', 'gtest_main_dep']) + # check if Gtest is newer than 1.14.0 + # if so set the minimum standard to c++14 + if gtest_dep.found() and gtest_dep.version().version_compare('>=1.14.0') + ## check if the std version is less than c++14 + if get_option('cpp_std').version_compare('