diff options
author | Determinant <[email protected]> | 2018-07-31 13:09:50 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2018-07-31 13:09:50 -0400 |
commit | c9faab354fb314bacd9849503d8b4566a8c9ea62 (patch) | |
tree | 7151c3cf4d3fccef35f04e9852d2abe17d238715 | |
parent | d2de1d9a704fc4b23e9a9fb8d610620d6d4752c1 (diff) |
add cmake options
-rw-r--r-- | CMakeLists.txt | 7 | ||||
-rw-r--r-- | include/salticidae/util.h | 4 | ||||
-rw-r--r-- | src/config.h.in | 7 | ||||
-rw-r--r-- | test/.gitignore | 2 | ||||
-rw-r--r-- | test/CMakeLists.txt | 4 | ||||
-rw-r--r-- | test/test_bits.cpp (renamed from test/test_stream.cpp) | 0 |
6 files changed, 15 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 587584f..6bcf5f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,8 +51,11 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) set(CMAKE_BUILD_TYPE "Release") endif() -option(SALTICIDAE_ENABLE_DEBUG_LOG "enable debug log" OFF) -option(SALTICIDAE_ENABLE_NORMAL_LOG "enable regular log" ON) +option(SALTICIDAE_DEBUG_LOG "enable debug log" OFF) +option(SALTICIDAE_NORMAL_LOG "enable regular log" ON) +option(SALTICIDAE_MSG_STAT "enable message statistics" ON) +option(SALTICIDAE_NOCHECK "disable the sanity check" OFF) +option(SALTICIDAE_NOCHECKSUM " disable checksum in messages" OFF) configure_file(src/config.h.in include/salticidae/config.h @ONLY) diff --git a/include/salticidae/util.h b/include/salticidae/util.h index e589693..39a3683 100644 --- a/include/salticidae/util.h +++ b/include/salticidae/util.h @@ -84,12 +84,12 @@ class Logger { extern Logger logger; -#ifdef SALTICIDAE_ENABLE_DEBUG_LOG +#ifdef SALTICIDAE_DEBUG_LOG #define SALTICIDAE_NORMAL_LOG #define SALTICIDAE_ENABLE_LOG_DEBUG #endif -#ifdef SALTICIDAE_ENABLE_NORMAL_LOG +#ifdef SALTICIDAE_NORMAL_LOG #define SALTICIDAE_ENABLE_LOG_INFO #define SALTICIDAE_ENABLE_LOG_WARN #endif diff --git a/src/config.h.in b/src/config.h.in index 7637923..fb39d63 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -1,7 +1,10 @@ #ifndef _SALTICIDAE_CONFIG_H #define _SALTICIDAE_CONFIG_H -#cmakedefine SALTICIDAE_ENABLE_DEBUG_LOG -#cmakedefine SALTICIDAE_ENABLE_NORMAL_LOG +#cmakedefine SALTICIDAE_DEBUG_LOG +#cmakedefine SALTICIDAE_NORMAL_LOG +#cmakedefine SALTICIDAE_MSG_STAT +#cmakedefine SALTICIDAE_NOCHECK +#cmakedefine SALTICIDAE_NOCHECKSUM #endif diff --git a/test/.gitignore b/test/.gitignore index bc79950..2cd44f2 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -1,5 +1,5 @@ test_msg -test_stream +test_bits test_network bench_network Makefile diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 58d204f..9689df3 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -23,8 +23,8 @@ add_executable(test_msg test_msg.cpp) target_link_libraries(test_msg salticidae_static) -add_executable(test_stream test_stream.cpp) -target_link_libraries(test_stream salticidae_static) +add_executable(test_bits test_bits.cpp) +target_link_libraries(test_bits salticidae_static) add_executable(test_network test_network.cpp) target_link_libraries(test_network salticidae_static) diff --git a/test/test_stream.cpp b/test/test_bits.cpp index 7128a9a..7128a9a 100644 --- a/test/test_stream.cpp +++ b/test/test_bits.cpp |