Skip to content

Commit 296ff38

Browse files
authored
CDRIVER-4247 Replace cmakedefine01 with autotools-compatible equivalent (#917)
1 parent 5d47589 commit 296ff38

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/libmongoc/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,11 @@ set (MONGOC_CC ${CMAKE_C_COMPILER})
351351
set (MONGOC_USER_SET_CFLAGS ${CMAKE_C_FLAGS})
352352
set (MONGOC_USER_SET_LDFLAGS ${CMAKE_EXE_LINKER_FLAGS})
353353

354-
set (MONGOC_TRACE "${ENABLE_TRACING}")
354+
if (ENABLE_TRACING)
355+
set (MONGOC_TRACE 1)
356+
else ()
357+
set (MONGOC_TRACE 0)
358+
endif ()
355359

356360
# Sets SNAPPY_LIBRARIES and SNAPPY_INCLUDE_DIRS.
357361
include (FindSnappy)

src/libmongoc/src/mongoc/mongoc-config.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@
366366
* Set if tracing is enabled. Logs things like network communication and
367367
* entry/exit of certain functions.
368368
*/
369-
#cmakedefine01 MONGOC_TRACE
369+
#define MONGOC_TRACE @MONGOC_TRACE@
370370

371371
enum {
372372
/**

0 commit comments

Comments
 (0)