diff options
author | Michele Papalini <micpapal@cisco.com> | 2019-04-19 08:01:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-04-19 08:01:16 +0000 |
commit | 578ddd558df8824a70ada334d7636614eab729f3 (patch) | |
tree | 45f950a25155c4b79feaa7801f1cc870721392da /libtransport | |
parent | 8e3bc96f29e8e0cefcd6349a1f98146677b20a9c (diff) | |
parent | 981cbc60271d794b1d9157ef0134ee4dfc362046 (diff) |
Merge "[HICN-97] Add options for enable/disable log in libtransport."
Diffstat (limited to 'libtransport')
-rw-r--r-- | libtransport/CMakeLists.txt | 13 | ||||
-rw-r--r-- | libtransport/src/hicn/transport/CMakeLists.txt | 3 |
2 files changed, 14 insertions, 2 deletions
diff --git a/libtransport/CMakeLists.txt b/libtransport/CMakeLists.txt index 131067888..1cc4c3539 100644 --- a/libtransport/CMakeLists.txt +++ b/libtransport/CMakeLists.txt @@ -29,6 +29,19 @@ if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") endif () +######################################### +# LOG LEVELS AVAILABLE +# VERBOSE +# DEBUG +# INFO +# WARN +# ERROR +# FATAL +# NONE +# +# Default: INFO +set(TRANSPORT_LOG_LEVEL "INFO" CACHE STRING "Set log level") + set(TRANSPORT_ROOT_PATH "src/hicn/transport") set(TRANSPORT_CORE ${TRANSPORT_ROOT_PATH}/core) diff --git a/libtransport/src/hicn/transport/CMakeLists.txt b/libtransport/src/hicn/transport/CMakeLists.txt index 4314ef908..4c0982c58 100644 --- a/libtransport/src/hicn/transport/CMakeLists.txt +++ b/libtransport/src/hicn/transport/CMakeLists.txt @@ -30,14 +30,13 @@ install( COMPONENT lib${LIBTRANSPORT}-dev ) -set (COMPILER_DEFINITIONS "") +set (COMPILER_DEFINITIONS "-DTRANSPORT_LOG_DEF_LEVEL=TRANSPORT_LOG_${TRANSPORT_LOG_LEVEL}") list(INSERT LIBTRANSPORT_INCLUDE_DIRS 0 ${CMAKE_CURRENT_SOURCE_DIR}/../.. ${CMAKE_CURRENT_BINARY_DIR}/../.. ) - if (NOT WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") else () |