|
@@ -35,6 +35,7 @@ set(CMAKE_CXX_STANDARD 14)
|
|
|
## set(CMAKE_CXX_STANDARD 17)
|
|
|
set(CMAKE_CXX_EXTENSIONS ON)
|
|
|
|
|
|
+set(DISABLE_BUFFER_DEBUG ON CACHE BOOL "Turn off buffer debugging")
|
|
|
|
|
|
# Enable testing
|
|
|
# set(BUILD_TESTING ON)
|
|
@@ -56,6 +57,9 @@ add_test(NAME test-lastseen
|
|
|
add_executable(test-utils test-utils.cpp utils.cpp)
|
|
|
add_dependencies(test-utils gtest)
|
|
|
target_link_libraries(test-utils gtest_main)
|
|
|
+if(${DISABLE_BUFFER_DEBUG})
|
|
|
+target_compile_definitions(test-utils PUBLIC NO_BUFFER_DEBUG=1)
|
|
|
+endif()
|
|
|
|
|
|
add_test(NAME test-utils
|
|
|
COMMAND test-utils)
|
|
@@ -64,11 +68,17 @@ add_executable(test-render test-render.cpp render.cpp terminal.cpp utils.cpp)
|
|
|
add_dependencies(test-render gtest)
|
|
|
target_link_libraries(test-render gtest_main)
|
|
|
target_link_libraries(test-render zf_log)
|
|
|
+if(${DISABLE_BUFFER_DEBUG})
|
|
|
+target_compile_definitions(test-render PUBLIC NO_BUFFER_DEBUG=1)
|
|
|
+endif()
|
|
|
|
|
|
add_executable(test-mangle test-mangle.cpp wordplay.cpp render.cpp terminal.cpp charman.cpp lastseen.cpp logs_utils.cpp)
|
|
|
add_dependencies(test-mangle gtest)
|
|
|
target_link_libraries(test-mangle gtest_main)
|
|
|
target_link_libraries(test-mangle zf_log)
|
|
|
+if(${DISABLE_BUFFER_DEBUG})
|
|
|
+target_compile_definitions(test-mangle PUBLIC NO_BUFFER_DEBUG=1)
|
|
|
+endif()
|
|
|
|
|
|
add_test(NAME test-render
|
|
|
COMMAND test-render)
|
|
@@ -115,16 +125,21 @@ target_link_libraries(hharry util)
|
|
|
target_link_libraries(hharry zf_log)
|
|
|
# target_compile_definitions(hharry PUBLIC ZF_LOG_DEF_LEVEL=ZF_LOG_INFO)
|
|
|
target_compile_definitions(hharry PUBLIC ZF_LOG_DEF_LEVEL=ZF_LOG_VERBOSE)
|
|
|
+if(${DISABLE_BUFFER_DEBUG})
|
|
|
target_compile_definitions(hharry PUBLIC NO_BUFFER_DEBUG=1)
|
|
|
+endif()
|
|
|
|
|
|
add_executable(try-re try-re.c)
|
|
|
|
|
|
add_executable(ansi-color ansi-color.c)
|
|
|
add_executable(ansi-to-src ansi-to-src.cpp utils.cpp)
|
|
|
+if(${DISABLE_BUFFER_DEBUG})
|
|
|
target_compile_definitions(ansi-to-src PUBLIC NO_BUFFER_DEBUG=1)
|
|
|
+endif()
|
|
|
|
|
|
add_executable(images images.cpp utils.cpp images.h)
|
|
|
target_link_libraries(images zf_log)
|
|
|
+if(${DISABLE_BUFFER_DEBUG})
|
|
|
target_compile_definitions(images PUBLIC NO_BUFFER_DEBUG=1)
|
|
|
-
|
|
|
+endif()
|
|
|
|