diff options
-rw-r--r-- | CMakeLists.txt | 11 | ||||
-rwxr-xr-x | other/travis/toxcore-script | 20 |
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 | ||
27 | option(DEBUG "Enable assertions and other debugging facilities" OFF) | 27 | option(DEBUG "Enable assertions and other debugging facilities" OFF) |
28 | if(DEBUG) | 28 | if(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() |
35 | endif() | 35 | endif() |
36 | 36 | ||
37 | option(TRACE "Enable TRACE level logging (expensive, for network debugging)" OFF) | ||
38 | if(TRACE) | ||
39 | set(MIN_LOGGER_LEVEL TRACE) | ||
40 | endif() | ||
41 | |||
42 | if(MIN_LOGGER_LEVEL) | ||
43 | add_definitions(-DMIN_LOGGER_LEVEL=LOG_${MIN_LOGGER_LEVEL}) | ||
44 | endif() | ||
45 | |||
37 | option(ASSOC_DHT "Enable module to store currently unused ID <=> IP associations" OFF) | 46 | option(ASSOC_DHT "Enable module to store currently unused ID <=> IP associations" OFF) |
38 | if(ASSOC_DHT) | 47 | if(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. |
9 | RUN $CMAKE \ | 9 | RUN $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 | ||
19 | export CTEST_OUTPUT_ON_FAILURE=1 | 21 | export CTEST_OUTPUT_ON_FAILURE=1 |
20 | 22 | ||