1
0
mirror of https://github.com/apple/foundationdb.git synced 2025-05-22 23:19:02 +08:00

Add support for using pre-packaged jemalloc, doctest_proj, and fix python support for old fdbserver binaries

This commit is contained in:
Russell Sears 2023-02-15 01:10:25 +00:00 committed by Aaron Molitor
parent bcc05b1058
commit d2af157189
3 changed files with 44 additions and 34 deletions
bindings/c/test/unit/third_party
cmake
tests

@ -1,4 +1,10 @@
# Download doctest repo.
if(EXISTS /opt/doctest_proj_2.4.8)
set(DOCTEST_INCLUDE_DIR "/opt/doctest_proj_2.4.8/doctest" CACHE INTERNAL "Path to include folder for doctest")
add_library(doctest INTERFACE)
add_dependencies(doctest doctest_proj)
target_include_directories(doctest INTERFACE "${DOCTEST_INCLUDE_DIR}")
else()
include(ExternalProject)
find_package(Git REQUIRED)
@ -19,3 +25,4 @@ set(DOCTEST_INCLUDE_DIR "${source_dir}/doctest" CACHE INTERNAL "Path to include
add_library(doctest INTERFACE)
add_dependencies(doctest doctest_proj)
target_include_directories(doctest INTERFACE "${DOCTEST_INCLUDE_DIR}")
endif()

@ -6,6 +6,9 @@ endif()
add_library(im_jemalloc_pic STATIC IMPORTED)
add_library(im_jemalloc STATIC IMPORTED)
if(EXISTS /opt/jemalloc_5.3.0)
set(JEMALLOC_DIR /opt/jemalloc_5.3.0)
else()
include(ExternalProject)
set(JEMALLOC_DIR "${CMAKE_BINARY_DIR}/jemalloc")
ExternalProject_add(Jemalloc_project
@ -19,6 +22,7 @@ ExternalProject_add(Jemalloc_project
BUILD_COMMAND make
INSTALL_DIR "${JEMALLOC_DIR}"
INSTALL_COMMAND make install)
endif()
add_dependencies(im_jemalloc Jemalloc_project)
add_dependencies(im_jemalloc_pic Jemalloc_project)
set_target_properties(im_jemalloc_pic PROPERTIES IMPORTED_LOCATION "${JEMALLOC_DIR}/lib/libjemalloc_pic.a")

@ -16,9 +16,8 @@ set(SANITIZER_OPTIONS "UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1;TSAN_OPT
# to test upgrades
if(WITH_PYTHON)
find_program(OLD_FDBSERVER_BINARY
fdbserver fdbserver.exe
HINTS /opt/foundationdb/old /usr/sbin /usr/libexec /usr/local/sbin /usr/local/libexec)
fdbserver-7.1.23 fdbserver fdbserver.exe
HINTS /opt/foundationdb/old/7.1.23/bin/ /opt/foundationdb/old /usr/sbin /usr/libexec /usr/local/sbin /usr/local/libexec)
if(OLD_FDBSERVER_BINARY)
message(STATUS "Use old fdb at ${OLD_FDBSERVER_BINARY}")
else()