public inbox for devicetree-compiler@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] meson: don't build test programs by default
@ 2025-03-02 22:28 Eli Schwartz
  2025-03-03  1:56 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Schwartz @ 2025-03-02 22:28 UTC (permalink / raw)
  To: devicetree-compiler

They are only used when running tests, and are included as depedencies
of the test cases themselves already. Marking them to not build by
default, means that 291 compile edges can be skipped when only running

```
meson setup builddir/
ninja -C builddir/
meson install -C builddir/
```

resulting in an overall much faster build. Instead they will be compiled
on-demand by `meson test`, only for users that actually run the tests.

Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
---
 tests/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/meson.build b/tests/meson.build
index 9cf6e3d..f1044b9 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,7 +1,9 @@
 trees = static_library('trees', files('trees.S'), c_args: '-D__ASSEMBLY__',
+                       build_by_default: false,
                        include_directories: libfdt_inc)
 
 dumptrees = executable('dumptrees', files('dumptrees.c'),
+                       build_by_default: false,
                        link_with: trees, dependencies: libfdt_dep)
 
 dumptrees_dtb = custom_target(
@@ -111,7 +113,7 @@ endif
 
 tests_exe = []
 foreach t: tests
-  tests_exe += executable(t, files(t + '.c'), dependencies: test_deps, link_args: extra_link_args)
+  tests_exe += executable(t, files(t + '.c'), dependencies: test_deps, link_args: extra_link_args, build_by_default: false)
 endforeach
 
 run_tests = find_program('run_tests.sh')
-- 
2.45.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-03  2:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-02 22:28 [PATCH] meson: don't build test programs by default Eli Schwartz
2025-03-03  1:56 ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox