build: Internal tests must set GTK_COMPILATION
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 9 May 2023 18:01:21 +0000 (19:01 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 9 May 2023 18:01:21 +0000 (19:01 +0100)
Otherwise they won't be able to use the appropriate function visibility
on Windows.

testsuite/css/meson.build
testsuite/gdk/meson.build
testsuite/gsk/meson.build
testsuite/gtk/meson.build

index 24084d6b05e26d8bde4996a5b6470baab08e0408..cf4f2f785d4ec3c8478f5031a263e3c7e6bf4c38 100644 (file)
@@ -28,7 +28,7 @@ test('api', test_api,
 
 test_data = executable('data',
   sources: ['data.c'],
-  c_args: common_cflags,
+  c_args: common_cflags + ['-DGTK_COMPILATION'],
   include_directories: [confinc, ],
   dependencies: libgtk_static_dep,
 )
@@ -42,7 +42,7 @@ test('data', test_data,
 
 transition = executable('transition',
   sources: ['transition.c'],
-  c_args: common_cflags,
+  c_args: common_cflags + ['-DGTK_COMPILATION'],
   dependencies: libgtk_static_dep,
 )
 
index 05f035139361cb2c4e15c8feaeb293b58408638f..13ed1ff31c963b67a482b99dab5ed32ae2e14e8b 100644 (file)
@@ -57,7 +57,7 @@ internal_tests = [
 
 foreach t : internal_tests
   test_exe = executable(t, '@0@.c'.format(t),
-    c_args: common_cflags,
+    c_args: common_cflags + ['-DGTK_COMPILATION'],
     dependencies: libgtk_static_dep,
     install: false,
   )
index a7bacb0020c3d7389551a550779e61a244fac602..7ef11174ae3ecb0dda942ef1d8aec455bae1a229 100644 (file)
@@ -397,7 +397,7 @@ foreach t : internal_tests
   test_exe = executable(test_name,
     sources: test_srcs,
     dependencies : libgtk_static_dep,
-    c_args : test_cargs + test_extra_cargs + common_cflags,
+    c_args : test_cargs + test_extra_cargs + common_cflags + ['-DGTK_COMPILATION'],
     link_args : test_extra_ldflags,
   )
 
index 7a27180854705bec4734dab2980baf1161062948..9354547bb356b0d545eca4bb4d2617148c0f151c 100644 (file)
@@ -191,7 +191,7 @@ foreach t : internal_tests
 
   test_exe = executable(test_name,
     sources: test_srcs,
-    c_args: test_cargs + test_extra_cargs,
+    c_args: test_cargs + test_extra_cargs + ['-DGTK_COMPILATION'],
     link_args: test_extra_ldflags,
     dependencies: libgtk_static_dep,
   )