]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: Exit early with subdir_done()
authorJan Janssen <medhefgo@web.de>
Mon, 2 May 2022 08:37:31 +0000 (10:37 +0200)
committerJan Janssen <medhefgo@web.de>
Wed, 4 May 2022 13:59:03 +0000 (15:59 +0200)
src/systemd/meson.build

index 9faee53db947b258649c71446c500aa1f56ba4bc..9302d6ca2e0216eb69b6031902bd681739efaf1b 100644 (file)
@@ -46,6 +46,10 @@ install_headers(
 
 ############################################################
 
+if want_tests == 'false'
+        subdir_done()
+endif
+
 opts = [['c'],
         ['c', '-ansi'],
         ['c', '-std=iso9899:1990'],
@@ -74,12 +78,10 @@ foreach header : _systemd_headers + _not_installed_headers + [libudev_h_path]
         foreach opt : opts
                 std_name = opt.length() == 2 ? '_'.join(opt[1].split(':')) : ''
                 name = ''.join(['cc-', header.split('/')[-1], '_', opt[0], std_name])
-                if want_tests != 'false'
-                        test(name,
-                             check_compilation_sh,
-                             args : cc.cmd_array() + ['-c', '-x'] + opt +
-                                    ['-Werror', '-include',
-                                     meson.current_source_dir() / header])
-                endif
+                test(name,
+                     check_compilation_sh,
+                     args : cc.cmd_array() + ['-c', '-x'] + opt +
+                             ['-Werror', '-include',
+                             meson.current_source_dir() / header])
         endforeach
 endforeach