[clutter/windows-fixes] meson.build: Force-include msvc_recommended_pragmas.h
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/windows-fixes] meson.build: Force-include msvc_recommended_pragmas.h
- Date: Wed, 20 Oct 2021 07:30:20 +0000 (UTC)
commit f98278c0b8658a53eafbadf1b7a9eacd266aee0c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Oct 20 15:27:16 2021 +0800
meson.build: Force-include msvc_recommended_pragmas.h
...on Visual Studio builds. We can get rid of lots of compiler noise
with that header, which we are free to use since we are always using
GLib.
Also, define _GNU_SOURCE when we are not using Visual Studio.
meson.build | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index e4051877a..4cb771aaa 100644
--- a/meson.build
+++ b/meson.build
@@ -28,7 +28,13 @@ clutter_libversion = '@0@.@1@.@2@'.format(clutter_so_age, clutter_binary_age, cl
cc = meson.get_compiler('c')
config_h = configuration_data()
-add_project_arguments([ '-D_GNU_SOURCE', '-DHAVE_CONFIG_H' ], language: 'c')
+add_project_arguments(['-DHAVE_CONFIG_H' ], language: 'c')
+
+if cc.get_id() == 'msvc'
+ add_project_arguments([ '-FImsvc_recommended_pragmas.h' ], language: 'c')
+else
+ add_project_arguments([ '-D_GNU_SOURCE' ], language: 'c')
+endif
# Paths
clutter_prefix = get_option('prefix')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]