Skip to content

Commit 0769b09

Browse files
authored
Merge pull request #662 from sanpeqf/fixup-refcount
fixup refcount: do not compile refcount-debug when debug disabled
2 parents 6f2f6f9 + ac3e7cb commit 0769b09

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/build.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ set(BFDEV_SOURCE
3939
${CMAKE_CURRENT_LIST_DIR}/radix.c
4040
${CMAKE_CURRENT_LIST_DIR}/ratelimit.c
4141
${CMAKE_CURRENT_LIST_DIR}/rbtree.c
42-
${CMAKE_CURRENT_LIST_DIR}/refcount.c
4342
${CMAKE_CURRENT_LIST_DIR}/respool.c
4443
${CMAKE_CURRENT_LIST_DIR}/ringbuf.c
4544
${CMAKE_CURRENT_LIST_DIR}/scnprintf.c
@@ -85,6 +84,13 @@ if(BFDEV_DEBUG_HEAP)
8584
)
8685
endif()
8786

87+
if(BFDEV_DEBUG_REFCNT)
88+
set(BFDEV_SOURCE
89+
${BFDEV_SOURCE}
90+
${CMAKE_CURRENT_LIST_DIR}/refcount-debug.c
91+
)
92+
endif()
93+
8894
include(${CMAKE_CURRENT_LIST_DIR}/cache/build.cmake)
8995
include(${CMAKE_CURRENT_LIST_DIR}/crypto/build.cmake)
9096
include(${CMAKE_CURRENT_LIST_DIR}/libc/build.cmake)
File renamed without changes.

0 commit comments

Comments
 (0)