[pangomm/pangomm-2-46] Meson: Apply /wd4828 for building gendef.exe only
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pangomm/pangomm-2-46] Meson: Apply /wd4828 for building gendef.exe only
- Date: Tue, 24 May 2022 08:08:36 +0000 (UTC)
commit f1bb2557389900f945e02cbf5a81541be29e5e31
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon May 23 17:27:04 2022 +0800
Meson: Apply /wd4828 for building gendef.exe only
...as that warning is only generated when building gendef.exe. Also, only
build gendef.exe when glibmm's gmmproc is unable to produce pangomm headers
that can export pangomm symbols via compiler directives.
Move the '/utf-8' check to be with the other compiler flags.
MSVC_NMake/gendef/meson.build | 9 +++++----
meson.build | 4 +---
2 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/MSVC_NMake/gendef/meson.build b/MSVC_NMake/gendef/meson.build
index 11c1c2f..c9728e2 100644
--- a/MSVC_NMake/gendef/meson.build
+++ b/MSVC_NMake/gendef/meson.build
@@ -1,9 +1,10 @@
# MSVC_NMake/gendef
-# Input: -
-# Output: -
+# Input: is_msvc, build_shared_libs_directly
+# Output: gendef
# 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 c7417eb..24d37f4 100644
--- a/meson.build
+++ b/meson.build
@@ -199,8 +199,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
if maintainer_mode
@@ -271,7 +269,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]