Skip to content

Commit 70646b2

Browse files
Add option to disable tests building
Make optional the building of the `tests` target. This is specially useful when targeting for platforms where the tests, as written today, are not supported.
1 parent a3cf825 commit 70646b2

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Makefile.am

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ if BUILD_OWN_KQUEUES
1212
MAYBE_KQUEUES = libkqueue
1313
endif
1414

15+
if BUILD_TESTS
16+
MAYBE_TESTS = tests
17+
endif
18+
1519
SUBDIRS= \
1620
dispatch \
1721
$(MAYBE_PTHREAD_WORKQUEUES) \
@@ -20,7 +24,7 @@ SUBDIRS= \
2024
os \
2125
private \
2226
src \
23-
tests
27+
$(MAYBE_TESTS)
2428

2529
EXTRA_DIST= \
2630
README.md \

configure.ac

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,13 @@ AC_COMPILE_IFELSE(
455455
[AC_DEFINE(HAVE_NORETURN_BUILTIN_TRAP, 1, [Define if __builtin_trap marked noreturn])]
456456
)
457457

458+
#
459+
# Add option to avoid building tests
460+
#
461+
AC_ARG_ENABLE([build-tests],
462+
[AS_HELP_STRING([--disable-build-tests], [Disable tests compilation])])
463+
AM_CONDITIONAL(BUILD_TESTS, [test "x$enable_build_tests" != "xno"])
464+
458465
#
459466
# Generate Makefiles.
460467
#

0 commit comments

Comments
 (0)