Skip to content

Commit 230bb5c

Browse files
committed
add CMake option ENABLE_TRACE
1 parent 971af90 commit 230bb5c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ option(ENABLE_TESTS "Build MongoDB C Driver tests." ON)
1414
option(ENABLE_EXAMPLES "Build MongoDB C Driver examples." ON)
1515
option(ENABLE_AUTOMATIC_INIT_AND_CLEANUP "Enable automatic init and cleanup (GCC only)" ON)
1616
option(ENABLE_CRYPTO_SYSTEM_PROFILE "Use system crypto profile (OpenSSL only)" OFF)
17+
option(ENABLE_TRACING "Turn on verbose debug output" OFF)
1718

1819
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/build/cmake)
1920

@@ -166,6 +167,10 @@ set (MONGOC_CC ${CMAKE_C_COMPILER})
166167
set (MONGOC_USER_SET_CFLAGS ${CMAKE_C_FLAGS})
167168
set (MONGOC_USER_SET_LDFLAGS ${CMAKE_EXE_LINKER_FLAGS})
168169

170+
if (ENABLE_TRACING)
171+
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMONGOC_TRACE")
172+
endif ()
173+
169174
configure_file (
170175
"${SOURCE_DIR}/src/mongoc/mongoc-config.h.in"
171176
"${PROJECT_BINARY_DIR}/src/mongoc/mongoc-config.h"

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ New features and bug fixes:
3535
exported symbols from the internal private ABI.
3636
* mongoc no longer crashes when multi roundtrip bulk operation fails.
3737
* Added support for the new readConcernLevel "linearizable".
38+
* New CMake option ENABLE_TRACING allows debug output, which before had only
39+
been available with "configure --enable-tracing".
3840

3941
Removed configure flags:
4042
* --enable-experimental has been removed and all of its features

0 commit comments

Comments
 (0)