spot/doc/org/g++wrap.in
Alexandre Duret-Lutz 23908f3d2f Add a --enable-pthread option to activate experimental threading code
* NEWS, README, doc/org/compile.org: Mention the option and
its effect on compilation requirements.
* configure.ac: Add the --enable-pthread option, and ENABLE_PTHREAD
macro.
* doc/org/g++wrap.in, spot/Makefile.am, spot/libspot.pc.in: Compile
with -pthread conditionally.
* spot/graph/graph.hh, spot/twa/twagraph.cc: Adjust the code to not
use thread-local variables, and let the pthread code be optional.
* .gitlab-ci.yml: Activate --enable-pthread in two configurations.
2022-06-21 09:56:13 +02:00

18 lines
695 B
Bash
Executable file

#!/bin/sh
# This is a wrapper around the compiler, to ensure that the code
# examples run from org-mode files are all linked with Spot.
#
# Also we save errors to org.errors, so that we can detect issues
# after org-mode has exported everything. Otherwise these errors
# would go undetected.
@top_builddir@/libtool link @CXX@ @CXXFLAGS@ @CPPFLAGS@ -Wall -Werror \
-I@abs_top_builddir@ -I@abs_top_srcdir@ -I@abs_top_srcdir@/buddy/src \
"$@" @abs_top_builddir@/spot/libspot.la \
@abs_top_builddir@/buddy/src/libbddx.la @LIBSPOT_PTHREAD@ 2> errors.$$
code=$?
if test $code -ne 0 && test -s errors.$$; then
cat errors.$$ >>org.errors
cat errors.$$ >&2
fi
rm -f errors.$$
exit $code