aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Buildscr15
1 files changed, 14 insertions, 1 deletions
diff --git a/Buildscr b/Buildscr
index 8723bb1..68bdf27 100644
--- a/Buildscr
+++ b/Buildscr
@@ -3,7 +3,7 @@
#
# You can cut out large components of the build by defining a subset
# of these options on the bob command line:
-# -DNOSIGN -DNOWINDOWS -DNOMACOS -DNOICONS -DNOJAVA -DNOJS
+# -DNOTEST -DNOSIGN -DNOWINDOWS -DNOMACOS -DNOICONS -DNOJAVA -DNOJS
module puzzles
@@ -41,6 +41,19 @@ ifneq "$(NOICONS)" yes then
in . do cp build-icons/icons/*-icon.c puzzles/icons
endif
+ifneq "$(NOTEST)" yes then
+ # Run tests. In particular, ensure we build in 'strict' mode with
+ # both gcc and clang.
+ ifeq "$(NOICONS)" yes then
+ # We don't need to run the gcc build if we did it above for the icons
+ in . do cmake -B test-gcc puzzles -DSTRICT=ON
+ in test-gcc do make -j$(nproc)
+ endif
+
+ in . do cmake -B test-clang puzzles -DSTRICT=ON -DCMAKE_C_COMPILER=clang
+ in test-clang do make -j$(nproc)
+endif
+
# The very first thing we do is to make the source archive, before we
# fill up the build directory with extra files.
delegate -