Changeset: 53c3cc9a82de for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/53c3cc9a82de
Modified Files:
cmake/monetdb-findpackages.cmake
tools/mserver/CMakeLists.txt
Branch: default
Log Message:
add cmake option to use alternative malloc library
diffs (42 lines):
diff --git a/cmake/monetdb-findpackages.cmake b/cmake/monetdb-findpackages.cmake
--- a/cmake/monetdb-findpackages.cmake
+++ b/cmake/monetdb-findpackages.cmake
@@ -101,6 +101,27 @@ if(RINTEGRATION)
find_package(LibR)
endif()
+if(WITH_MALLOC)
+ find_package(PkgConfig QUIET)
+ if(${WITH_MALLOC} STREQUAL "mimalloc")
+ find_package(mimalloc REQUIRED)
+ add_library(Malloc::Malloc ALIAS mimalloc)
+ set(MALLOC_FOUND 1)
+ else()
+ pkg_search_module(PC_MALLOC ${WITH_MALLOC} lib${WITH_MALLOC})
+
+ if(PC_MALLOC_FOUND)
+ set(MALLOC_FOUND 1)
+ find_library(MALLOC_LIBRARY ${PC_MALLOC_LIBRARIES} HINTS
${PC_MALLOC_LIBDIR} ${PC_MALLOC_LIBRARY_DIRS})
+ add_library(Malloc::Malloc UNKNOWN IMPORTED)
+ set_target_properties(Malloc::Malloc
+ PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${PC_MALLOC_INCLUDE_DIR}"
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION
"${MALLOC_LIBRARY}")
+ endif()
+ endif()
+endif()
+
find_package(Sphinx)
find_package(Createrepo)
find_package(Rpmbuild)
diff --git a/tools/mserver/CMakeLists.txt b/tools/mserver/CMakeLists.txt
--- a/tools/mserver/CMakeLists.txt
+++ b/tools/mserver/CMakeLists.txt
@@ -50,6 +50,7 @@ target_link_libraries(mserver5
monetdb5
$<$<PLATFORM_ID:Windows>:${GETOPT_LIB}>
$<$<BOOL:${PCRE_FOUND}>:PCRE::PCRE>
+ $<$<BOOL:${MALLOC_FOUND}>:Malloc::Malloc>
Threads::Threads)
add_executable(shutdowntest)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list