From 727fd382a2aa86b72587d3ea8588fa83dfdbdad6 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Wed, 25 Jan 2023 15:47:20 +0100 Subject: [PATCH] cmake: add USE_TRACE option (default OFF) (#660) --- cmake/re-config.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/re-config.cmake b/cmake/re-config.cmake index 1c45bed00..38f544f3a 100644 --- a/cmake/re-config.cmake +++ b/cmake/re-config.cmake @@ -9,6 +9,7 @@ find_package(OpenSSL) option(USE_OPENSSL "Enable OpenSSL" ${OPENSSL_FOUND}) option(USE_UNIXSOCK "Enable Unix Domain Sockets" ON) +option(USE_TRACE "Enable Tracing helpers" OFF) check_symbol_exists("arc4random" "stdlib.h" HAVE_ARC4RANDOM) if(HAVE_ARC4RANDOM) @@ -122,6 +123,12 @@ else() ) endif() +if(USE_TRACE) + list(APPEND RE_DEFINITIONS + -DRE_TRACE_ENABLED + ) +endif() + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") list(APPEND RE_DEFINITIONS -DDARWIN) include_directories(/opt/local/include)