Skip to content

Commit c40de50

Browse files
committed
Remove kv_engine-specific CMAKE_MINIMUM_REQUIRED
We can just inherit the top-level make (tlm)'s setting; which avoids having to maintain the minimum for each project. This fixes the following CMake warning: CMake Warning (dev) at kv_engine/engines/ep/tests/CMakeLists.txt:120 (target_sources): Policy CMP0076 is not set: target_sources() command converts relative paths to absolute. Run "cmake --help-policy CMP0076" for policy details. Use the cmake_policy command to set the policy and suppress this warning. An interface source of target "ep-engine_ep_unit_tests" has a relative path. Note: Moving from CMake minimum 3.2 to 3.15 (current in top-level) changes policy CMP0065[1], which doesn't export symbols from executables by default. To allow the breakpad test symbol recursive_crash_function to still be visible we need to set ENABLE_EXPORTS on memcached. [1]: https://cmake.org/cmake/help/latest/policy/CMP0065.html Change-Id: I2b70d9acfa260c30abcbd6c6d5acc8788ecda188 Reviewed-on: http://review.couchbase.org/c/kv_engine/+/155206 Tested-by: Build Bot <[email protected]> Reviewed-by: Trond Norbye <[email protected]>
1 parent cd54fd8 commit c40de50

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
21
PROJECT(Memcached LANGUAGES C CXX)
32

43
INCLUDE(CheckCSourceCompiles)

daemon/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,15 @@ ADD_EXECUTABLE(memcached main.cc)
230230
TARGET_LINK_LIBRARIES(memcached memcached_daemon)
231231
add_sanitizers(memcached)
232232
kv_enable_pch(memcached)
233+
# Allow 'memcached' to export symbols - i.e. symbols marked as
234+
# MEMCACHED_PUBLIC_API / MEMCACHED_PUBLIC_CLASS should marked as externally
235+
# visible in the symbol table.
236+
# We don't strictly _need_ this setting, memcached is now statically linked
237+
# and hence no symbols need to be visible externally for the product, however
238+
# we do still mark a test function (recursive_crash_function in crash_engine)
239+
# As MEMCACHED_PUBLIC_API to verify Breakpad is working correctly and it's
240+
# valuble to still be able to see that symbol.
241+
set_target_properties(memcached PROPERTIES ENABLE_EXPORTS TRUE)
233242

234243
INSTALL(TARGETS memcached
235244
RUNTIME DESTINATION bin)

0 commit comments

Comments
 (0)