Skip to content

Commit fb11231

Browse files
trondnpaolococchi
authored andcommitted
MB-72121: Enable symbol export for ep-engine test targets
Enable symbol export on ep-engine test executables (ENABLE_EXPORTS) to allow linking against test symbols for Debug builds. This adds ENABLE_EXPORTS to: - ep-engine_ep_unit_tests - ep-engine_couch-fs-stats_test - ep-testsuite test targets Change-Id: I820adb5d9e2c7d051263564510538d3e0240757a Reviewed-on: https://review.couchbase.org/c/kv_engine/+/245718 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>
1 parent 7f6af76 commit fb11231

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

engines/ep/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,9 @@ endif(NOT WIN32)
455455
# test.
456456
function(add_ep_testsuite name source)
457457
cb_add_test_executable(${name} ${source})
458+
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
459+
set_target_properties(${name} PROPERTIES ENABLE_EXPORTS TRUE)
460+
endif()
458461
kv_enable_pch(${name})
459462
target_link_libraries(${name}
460463
PRIVATE

engines/ep/tests/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ IF(EP_USE_MAGMA)
167167
ENDIF()
168168
cb_enable_unity_build(ep-engine_ep_unit_tests)
169169
set_target_properties(ep-engine_ep_unit_tests PROPERTIES UNITY_BUILD_BATCH_SIZE 4)
170+
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
171+
set_target_properties(ep-engine_ep_unit_tests PROPERTIES ENABLE_EXPORTS TRUE)
172+
endif()
170173

171174
TARGET_INCLUDE_DIRECTORIES(ep-engine_ep_unit_tests
172175
PUBLIC
@@ -217,6 +220,9 @@ cb_add_test_executable(ep-engine_couch-fs-stats_test
217220
${Memcached_SOURCE_DIR}/executor/globaltask.cc
218221
${Memcached_SOURCE_DIR}/executor/tracer.cc
219222
$<TARGET_OBJECTS:couchstore_wrapped_fileops_test_framework>)
223+
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
224+
set_target_properties(ep-engine_couch-fs-stats_test PROPERTIES ENABLE_EXPORTS TRUE)
225+
endif()
220226
kv_enable_pch(ep-engine_couch-fs-stats_test)
221227
TARGET_INCLUDE_DIRECTORIES(ep-engine_couch-fs-stats_test
222228
PRIVATE

0 commit comments

Comments
 (0)