add config for main config
This commit is contained in:
@@ -5,6 +5,6 @@
|
||||
add_library(packet packet.cpp)
|
||||
target_include_directories(packet PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
target_include_directories(packet PUBLIC ${CMAKE_SOURCE_DIR}/deps/uthash)
|
||||
target_link_libraries(packet tuple)
|
||||
target_link_libraries(packet tuple log)
|
||||
|
||||
add_subdirectory(test)
|
||||
@@ -9,14 +9,15 @@ extern "C"
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "tuple.h"
|
||||
#include "log.h"
|
||||
|
||||
#define PACKET_MAX_LAYERS 16
|
||||
// #define PACKET_LOG_ERROR(format, ...) void(0)
|
||||
#define PACKET_LOG_ERROR(format, ...) LOG_ERROR("packet", format, ##__VA_ARGS__)
|
||||
#ifndef PACKET_LOG_ERROR
|
||||
#define PACKET_LOG_ERROR(format, ...) \
|
||||
fprintf(stderr, "ERROR (packet), " format "\n", ##__VA_ARGS__);
|
||||
#endif
|
||||
// #define PACKET_LOG_DEBUG(format, ...) void(0)
|
||||
#define PACKET_LOG_DEBUG(format, ...) LOG_DEBUG("packet", format, ##__VA_ARGS__)
|
||||
#ifndef PACKET_LOG_DEBUG
|
||||
#define PACKET_LOG_DEBUG(format, ...) \
|
||||
fprintf(stderr, "DEBUG (packet), " format "\n", ##__VA_ARGS__);
|
||||
|
||||
Reference in New Issue
Block a user