[vala/meson-msvc: 18/19] 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: 18/19] meson: Make tests run better on MSVC builds
- Date: Thu, 27 Jan 2022 04:48:59 +0000 (UTC)
commit 46f8c9ada3c08e4023f695741a7f387dc00516bb
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 1c27c02f9..fa0bc6bb5 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1367,13 +1367,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]