mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
02e9cd38f1
When cross-compiling to <target> from Linux, cmake might find native Linux libconfig and decide to build tox-bootstrapd. If the target is Windows, this will fail, as tox-bootstrapd can't be built for Windows in the first place. If the target is Linux of some other architecture, then using host native libconfig will fail too. Thus an option is needed to guard against this.
23 lines
780 B
Bash
Executable File
23 lines
780 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Enable test coverage recording.
|
|
export CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
|
|
|
|
# Build toxcore and run tests.
|
|
# TODO(iphydf): Enable ASAN. It currently has some bad interactions with gcov,
|
|
# so it's disabled on Travis.
|
|
RUN $CMAKE \
|
|
-B$BUILD_DIR \
|
|
-H. \
|
|
-DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install \
|
|
-DDEBUG=ON \
|
|
-DASSOC_DHT=ON \
|
|
-DSTRICT_ABI=ON \
|
|
-DTEST_TIMEOUT_SECONDS=300 \
|
|
$CMAKE_EXTRA_FLAGS #-DASAN=ON
|
|
|
|
export CTEST_OUTPUT_ON_FAILURE=1
|
|
|
|
RUN make -C$BUILD_DIR -j$NPROC -k install
|
|
TESTS make -C$BUILD_DIR -j$NPROC test
|