summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt11
-rwxr-xr-xother/travis/toxcore-script20
2 files changed, 21 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f300cd90..fb130ce8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,14 +26,23 @@ set(CMAKE_MACOSX_RPATH ON)
26 26
27option(DEBUG "Enable assertions and other debugging facilities" OFF) 27option(DEBUG "Enable assertions and other debugging facilities" OFF)
28if(DEBUG) 28if(DEBUG)
29 set(MIN_LOGGER_LEVEL DEBUG)
29 add_definitions(-DTOX_DEBUG=1) 30 add_definitions(-DTOX_DEBUG=1)
30 add_definitions(-DMIN_LOGGER_LEVEL=LOG_TRACE)
31 check_c_compiler_flag("-g3" HAVE_G3) 31 check_c_compiler_flag("-g3" HAVE_G3)
32 if(HAVE_G3) 32 if(HAVE_G3)
33 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3") 33 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3")
34 endif() 34 endif()
35endif() 35endif()
36 36
37option(TRACE "Enable TRACE level logging (expensive, for network debugging)" OFF)
38if(TRACE)
39 set(MIN_LOGGER_LEVEL TRACE)
40endif()
41
42if(MIN_LOGGER_LEVEL)
43 add_definitions(-DMIN_LOGGER_LEVEL=LOG_${MIN_LOGGER_LEVEL})
44endif()
45
37option(ASSOC_DHT "Enable module to store currently unused ID <=> IP associations" OFF) 46option(ASSOC_DHT "Enable module to store currently unused ID <=> IP associations" OFF)
38if(ASSOC_DHT) 47if(ASSOC_DHT)
39 add_definitions(-DENABLE_ASSOC_DHT=1) 48 add_definitions(-DENABLE_ASSOC_DHT=1)
diff --git a/other/travis/toxcore-script b/other/travis/toxcore-script
index e023ff81..88a927b6 100755
--- a/other/travis/toxcore-script
+++ b/other/travis/toxcore-script
@@ -6,15 +6,17 @@ export CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6# Build toxcore and run tests. 6# Build toxcore and run tests.
7# TODO(iphydf): Enable ASAN. It currently has some bad interactions with gcov, 7# TODO(iphydf): Enable ASAN. It currently has some bad interactions with gcov,
8# so it's disabled on Travis. 8# so it's disabled on Travis.
9RUN $CMAKE \ 9RUN $CMAKE \
10 -B$BUILD_DIR \ 10 -B$BUILD_DIR \
11 -H. \ 11 -H. \
12 -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install \ 12 -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install \
13 -DDEBUG=ON \ 13 -DASSOC_DHT=ON \
14 -DASSOC_DHT=ON \ 14 -DDEBUG=ON \
15 -DSTRICT_ABI=ON \ 15 -DSTRICT_ABI=ON \
16 -DTEST_TIMEOUT_SECONDS=300 \ 16 -DTEST_TIMEOUT_SECONDS=300 \
17 $CMAKE_EXTRA_FLAGS #-DASAN=ON 17 -DTRACE=ON \
18 $CMAKE_EXTRA_FLAGS \
19 #-DASAN=ON
18 20
19export CTEST_OUTPUT_ON_FAILURE=1 21export CTEST_OUTPUT_ON_FAILURE=1
20 22