summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2021-10-20 15:27:16 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2021-10-20 15:27:16 +0800
commitf98278c0b8658a53eafbadf1b7a9eacd266aee0c (patch)
treece9644891f66ab6793ef5b9df4007a81f0b051e3
parentff463f8692eb33c5b8a1287e120ea2a966241731 (diff)
downloadclutter-f98278c0b8658a53eafbadf1b7a9eacd266aee0c.tar.gz
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.
-rw-r--r--meson.build8
1 files changed, 7 insertions, 1 deletions
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')