Octave: use pre-compiled headers to speed up test suite, if supported

This commit is contained in:
Karl Wette 2020-05-29 17:05:01 +10:00
commit d11e29615d
12 changed files with 225 additions and 133 deletions

View file

@ -5,6 +5,7 @@
LANGUAGE = octave
OCTAVE = @OCTAVE@
SCRIPTSUFFIX = _runme.m
PCHSUPPORT = @PCHSUPPORT@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@ -61,6 +62,23 @@ CSRCS = octave_empty.c
+$(swig_and_compile_multi_cpp)
$(run_testcase)
# Pre-compile Octave headers, if supported
ifeq (yes,$(PCHSUPPORT))
export OCTHEADERSSRC = @top_srcdir@/Lib/octave/octheaders.hpp
export OCTHEADERS = @top_builddir@/Examples/test-suite/octave/octheaders.hpp
export OCTHEADERSGCH = $(OCTHEADERS).gch
export SWIGOCTHDROPT = -DSWIG_OCTAVE_EXTERNAL_OCTHEADERS
export IOCTHEADERS = -I@top_builddir@/Examples/test-suite/octave @PCHINCLUDEARG@ $(OCTHEADERS)@PCHINCLUDEEXT@
$(OCTHEADERSGCH): $(OCTHEADERSSRC)
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile octave_precompile_headers
$(NOT_BROKEN_TEST_CASES) $(BROKEN_TEST_CASES): $(OCTHEADERSGCH)
endif
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.m appended after the testcase name.
run_testcase = \