[gtksourceview] build: fix compilation warning for GIR
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] build: fix compilation warning for GIR
- Date: Fri, 5 Nov 2021 04:21:46 +0000 (UTC)
commit 6d62aa996cc75c0d55d9ccc5fedb6d210ffc11d4
Author: Christian Hergert <chergert redhat com>
Date: Thu Nov 4 21:20:59 2021 -0700
build: fix compilation warning for GIR
We don't need to pass our deprecation flags to everything the project
compiles as some of that is generated by meson and is out of our control.
gtksourceview/meson.build | 4 ++--
meson.build | 5 ++---
tests/meson.build | 4 ++--
testsuite/meson.build | 2 +-
4 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/gtksourceview/meson.build b/gtksourceview/meson.build
index c6dc5bbf..691c0cd8 100644
--- a/gtksourceview/meson.build
+++ b/gtksourceview/meson.build
@@ -233,7 +233,7 @@ core_enums_h = core_enums.get(1)
core_lib = static_library(package_string + 'core', core_sources,
include_directories: gtksourceview_include_dirs,
dependencies: core_deps,
- c_args: core_c_args,
+ c_args: core_c_args + deprecated_c_args,
install: false
)
@@ -261,7 +261,7 @@ gtksource_lib = library(package_string,
include_directories: gtksourceview_include_dirs,
dependencies: gtksource_deps,
link_whole: gtksource_libs,
- c_args: core_c_args,
+ c_args: core_c_args + deprecated_c_args,
link_args: release_link_args,
install: true,
gnu_symbol_visibility: 'hidden',
diff --git a/meson.build b/meson.build
index b9d6bc7d..361acb63 100644
--- a/meson.build
+++ b/meson.build
@@ -122,8 +122,7 @@ gtk_version_arr = gtk_req_version.split('.')
gtk_major_version = gtk_version_arr[0]
gtk_minor_version = gtk_version_arr[1]
-# Configurations
-add_project_arguments([
+deprecated_c_args = [
'-DG_DISABLE_DEPRECATED',
'-DGDK_DISABLE_DEPRECATED',
'-DGTK_DISABLE_DEPRECATED',
@@ -132,7 +131,7 @@ add_project_arguments([
'-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_@0@_@1@'.format(gtk_major_version, gtk_minor_version),
'-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_@0@_@1@'.format(glib_major_version, glib_minor_version),
'-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_@0@_@1@'.format(glib_major_version, glib_minor_version),
-], language: 'c')
+]
config_h = configuration_data()
config_h.set_quoted('GETTEXT_PACKAGE', package_string)
diff --git a/tests/meson.build b/tests/meson.build
index 0d3fd2c3..61a85c1a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -38,7 +38,7 @@ foreach test_name, test_sources: tests_sources
if get_option('install_tests')
if test_name == 'widget'
executable('gtksourceview@0@-widget'.format(api_version), test_sources,
- c_args: tests_c_args,
+ c_args: tests_c_args + deprecated_c_args,
dependencies: tests_deps,
install: true,
)
@@ -48,7 +48,7 @@ foreach test_name, test_sources: tests_sources
# MSVC builds: We need items from the main GtkSourceView .lib as
# well as the static core lib
executable('test-@0@'.format(test_name), test_sources,
- c_args: tests_c_args,
+ c_args: tests_c_args + deprecated_c_args,
dependencies: tests_deps,
)
endforeach
diff --git a/testsuite/meson.build b/testsuite/meson.build
index 4bd0f6ea..efa4072a 100644
--- a/testsuite/meson.build
+++ b/testsuite/meson.build
@@ -57,7 +57,7 @@ foreach test: testsuite_sources
# get installed in the vast majority of cases, that is worth the extra
# link and size bloat to make the common case better.
test_exe = executable(test_name, test_sources,
- c_args: testsuite_c_args,
+ c_args: testsuite_c_args + deprecated_c_args,
dependencies: [core_dep, completionwords_dep],
install: get_option('install_tests'),
install_dir: testexecdir
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]