[vala/meson-msvc: 16/18] meson: Make tests run better on MSVC builds
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/meson-msvc: 16/18] meson: Make tests run better on MSVC builds
- Date: Fri, 28 Jan 2022 08:50:36 +0000 (UTC)
commit 734b60dd8c249618b63712c99e17201a596fee26
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Jan 26 18:22:21 2022 +0800
meson: Make tests run better on MSVC builds
Use compiler flags that would work on Visual Studio so that tests can
run much better than without. Currently, one may need to set the
PKG_CONFIG envvar to `<pkg-config-executable> --msvc-syntax` for this to
work best.
tests/meson.build | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/tests/meson.build b/tests/meson.build
index 1f22ddaec..1c5d738c1 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1371,13 +1371,23 @@ vala_flags = [
'--disable-warnings',
'--save-temps',
'--cc', cc.cmd_array()[-1],
+ '-X', '-DGETTEXT_PACKAGE="valac"',
+]
+
+if cc.get_id() == 'msvc'
+vala_flags += [
+ '-X', '-Od',
+ '-X', 'gmodule-2.0.lib', # undefined reference to `g_module_open_full'
+]
+else
+vala_flags += [
'-X', '-g',
'-X', '-O0',
'-X', '-pipe',
'-X', '-lm',
'-X', '-lgmodule-2.0', # undefined reference to `g_module_open_full'
- '-X', '-DGETTEXT_PACKAGE="valac"',
]
+endif
test_envars = [
'G_DEBUG=fatal-warnings',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]