Skip to content

Commit 889179e

Browse files
author
Christian Hergert
committed
build: add --disable-tests build option.
1 parent 3720477 commit 889179e

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ AM_CTAGSFLAGS = --fields=+l --languages=c
1616

1717
include doc/Makefile.am
1818
include src/Makefile.am
19+
20+
if ENABLE_TESTS
1921
include tests/Makefile.am
22+
endif
2023

2124
if ENABLE_EXAMPLES
2225
include examples/Makefile.am

build/autotools/ReadCommandLineArguments.m4

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,9 @@ AC_ARG_ENABLE([examples],
9696
[Build MongoDB C Driver examples.])],
9797
[],
9898
[enable_examples=yes])
99+
100+
AC_ARG_ENABLE([tests],
101+
[AS_HELP_STRING([--enable-tests=@<:@yes/no@:>@],
102+
[Build MongoDB C Driver tests.])],
103+
[],
104+
[enable_tests=yes])

build/autotools/SetupAutomake.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ AM_CONDITIONAL([EXPLICIT_LIBS],[test "$with_gnu_ld" = "yes"])
3535
# Should we build the examples.
3636
AM_CONDITIONAL([ENABLE_EXAMPLES],[test "$enable_examples" = "yes"])
3737

38+
# Should we build the tests.
39+
AM_CONDITIONAL([ENABLE_TESTS],[test "$enable_tests" = "yes"])
40+
3841
# Should we build man pages
3942
AM_CONDITIONAL([ENABLE_MAN_PAGES],[test "$enable_man_pages" = "yes"])
4043

0 commit comments

Comments
 (0)