mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-06-14 09:02:26 +02:00
41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
From a793c7d67fc886b1eb66ab67551f3a2448e4adc0 Mon Sep 17 00:00:00 2001
|
|
From: Matthew Smith <matthew@gentoo.org>
|
|
Date: Thu, 9 Jun 2022 20:19:19 +0100
|
|
Subject: [PATCH] build: Use system mimalloc
|
|
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -185,13 +185,7 @@ endif()
|
|
message(STATUS "Using in-tree libdxfrw")
|
|
add_subdirectory(extlib/libdxfrw)
|
|
|
|
-message(STATUS "Using in-tree mimalloc")
|
|
-set(MI_OVERRIDE OFF CACHE BOOL "")
|
|
-set(MI_BUILD_SHARED OFF CACHE BOOL "")
|
|
-set(MI_BUILD_OBJECT OFF CACHE BOOL "")
|
|
-set(MI_BUILD_TESTS OFF CACHE BOOL "")
|
|
-add_subdirectory(extlib/mimalloc EXCLUDE_FROM_ALL)
|
|
-set(MIMALLOC_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/extlib/mimalloc/include)
|
|
+find_package(mimalloc REQUIRED)
|
|
|
|
if(NOT FORCE_VENDORED_Eigen3)
|
|
find_package(Eigen3 CONFIG)
|
|
--- a/src/CMakeLists.txt
|
|
+++ b/src/CMakeLists.txt
|
|
@@ -27,7 +27,6 @@ target_include_directories(slvs_deps INTERFACE SYSTEM
|
|
${PNG_PNG_INCLUDE_DIR}
|
|
${FREETYPE_INCLUDE_DIRS}
|
|
${CAIRO_INCLUDE_DIRS}
|
|
- ${MIMALLOC_INCLUDE_DIR}
|
|
${EIGEN3_INCLUDE_DIRS})
|
|
target_link_libraries(slvs_deps INTERFACE
|
|
dxfrw
|
|
@@ -35,7 +34,7 @@ target_link_libraries(slvs_deps INTERFACE
|
|
${PNG_LIBRARY}
|
|
${FREETYPE_LIBRARY}
|
|
${CAIRO_LIBRARIES}
|
|
- mimalloc-static)
|
|
+ mimalloc)
|
|
|
|
if(Backtrace_FOUND)
|
|
target_include_directories(slvs_deps INTERFACE SYSTEM
|