From 6d9a80209885a4d149be2ac3e04472252788d3e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Guzm=C3=A1n?= Date: Tue, 13 Aug 2024 23:11:02 -0600 Subject: [PATCH] fix unused variables in meson --- examples/example1/meson.build | 20 +++++++++----------- examples/example2/meson.build | 19 +++++++++---------- meson.build | 8 -------- 3 files changed, 18 insertions(+), 29 deletions(-) diff --git a/examples/example1/meson.build b/examples/example1/meson.build index e6dee9ed..7fdd3a5f 100644 --- a/examples/example1/meson.build +++ b/examples/example1/meson.build @@ -1,8 +1,5 @@ - -example1_sources = files( - 'main.cpp' -) +example1_sources = files('main.cpp') example1_args = [] @@ -11,10 +8,11 @@ if host_machine.system() == 'windows' example1_args += ['-D_CRT_SECURE_NO_WARNINGS'] endif - -sqlitecpp_demo1_exe = executable('SQLITECPP_sample_demo1', - sqlitecpp_sample1_srcs, - dependencies: sqlitecpp_dep, - # inherit the default options from sqlitecpp - override_options: sqlitecpp_opts, - cpp_args: example1_args,) \ No newline at end of file +executable( + 'SQLITECPP_sample_demo1', + sources: example1_sources, + dependencies: sqlitecpp_dep, + # inherit the default options from sqlitecpp + override_options: sqlitecpp_opts, + cpp_args: example1_args, +) diff --git a/examples/example2/meson.build b/examples/example2/meson.build index c252f5e3..fb782bde 100644 --- a/examples/example2/meson.build +++ b/examples/example2/meson.build @@ -1,14 +1,13 @@ -example2_srcs = files( - 'src/main.cpp' -) +example2_srcs = files('src/main.cpp') # if running on windows define _CRT_SECURE_NO_WARNINGS example2_args = [] - -sqlitecpp_demo2_exe = executable('SQLITECPP_sample_demo2', - sqlitecpp_sample2_srcs, - dependencies: sqlitecpp_dep, - # inherit the default options from sqlitecpp - override_options: sqlitecpp_opts, - cpp_args: example2_args) +executable( + 'SQLITECPP_sample_demo2', + example2_srcs, + dependencies: sqlitecpp_dep, + # inherit the default options from sqlitecpp + override_options: sqlitecpp_opts, + cpp_args: example2_args, +) diff --git a/meson.build b/meson.build index 7fb35d00..2aac5cc4 100644 --- a/meson.build +++ b/meson.build @@ -86,14 +86,6 @@ sqlitecpp_test_srcs = files( ) sqlitecpp_test_args = [] -## samples - -sqlitecpp_sample1_srcs = files( - 'examples/example1/main.cpp', -) -sqlitecpp_sample2_srcs = files( - 'examples/example2/src/main.cpp', -) ## 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