Skip to content

Commit

Permalink
cmake: add USE_TRACE option (default OFF) (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers authored Jan 25, 2023
1 parent e281bc6 commit 727fd38
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmake/re-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 727fd38

Please sign in to comment.