[atkmm/atkmm-2-28] Meson: Apply '/wd4828' only for gendef.exe
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atkmm/atkmm-2-28] Meson: Apply '/wd4828' only for gendef.exe
- Date: Tue, 24 May 2022 08:15:39 +0000 (UTC)
commit e19d5a082718c13e24a2574da8d6b3a32f1136ec
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon May 23 16:25:26 2022 +0800
Meson: Apply '/wd4828' only for gendef.exe
... as the warning only applies to gendef.cc, and only apply that if we need to
build gendef.exe (the gmmproc from glibmm is too old to generate the headers
that can export symbols without needing to use gendef.exe).
Move the '/utf-8' flag check to be with the other warning-related compiler
flags.
MSVC_NMake/gendef/meson.build | 7 ++++---
meson.build | 3 +--
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/MSVC_NMake/gendef/meson.build b/MSVC_NMake/gendef/meson.build
index 32babb7..0fa04f1 100644
--- a/MSVC_NMake/gendef/meson.build
+++ b/MSVC_NMake/gendef/meson.build
@@ -1,9 +1,10 @@
# MSVC_NMake/gendef
# Input: is_msvc
-# Output: gendef
+# Output: gendef, build_shared_libs_directly
# Used to generate the .def file required to obtain the import .lib file
-if is_msvc
- gendef = executable('gendef', 'gendef.cc', install: false,)
+if is_msvc and not build_shared_libs_directly
+ gendef_cxx_flags = cpp_compiler.get_supported_arguments(['/wd4828'])
+ gendef = executable('gendef', 'gendef.cc', cpp_args: gendef_cxx_flags, install: false,)
endif
diff --git a/meson.build b/meson.build
index b6cc696..b9e1514 100644
--- a/meson.build
+++ b/meson.build
@@ -197,7 +197,6 @@ use_msvc14x_toolset_ver = get_option('msvc14x-parallel-installable')
msvc14x_toolset_ver = ''
if is_msvc
- add_project_arguments(cpp_compiler.get_supported_arguments([ '/utf-8', '/wd4828']), language: 'cpp')
# Check for the first line in a file generated with gmmproc,
# to see which gmmproc version was used
@@ -267,7 +266,7 @@ add_project_arguments(warning_flags, language: 'cpp')
# MSVC: Ignore warnings that aren't really harmful, but make those
# that should not be overlooked stand out.
if is_msvc
- foreach wd : ['/FImsvc_recommended_pragmas.h', '/wd4267', '/EHsc']
+ foreach wd : ['/FImsvc_recommended_pragmas.h', '/utf-8', '/wd4267', '/EHsc']
disabled_warning = cpp_compiler.get_supported_arguments(wd)
add_project_arguments(disabled_warning, language: 'cpp')
endforeach
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]