Add and build mimalloc at 07c6e60a5a3bd7de09e4a170cd97bafba59cfafd
parent
9802b5d1ee
commit
cbac182edf
|
@ -26,3 +26,6 @@
|
||||||
[submodule "extlib/q3d"]
|
[submodule "extlib/q3d"]
|
||||||
path = extlib/q3d
|
path = extlib/q3d
|
||||||
url = https://github.com/q3k/q3d
|
url = https://github.com/q3k/q3d
|
||||||
|
[submodule "extlib/mimalloc"]
|
||||||
|
path = extlib/mimalloc
|
||||||
|
url = https://github.com/microsoft/mimalloc
|
||||||
|
|
|
@ -7,4 +7,4 @@ sudo apt-get install -q -y \
|
||||||
libfontconfig1-dev libgtkmm-3.0-dev libpangomm-1.4-dev libgl-dev \
|
libfontconfig1-dev libgtkmm-3.0-dev libpangomm-1.4-dev libgl-dev \
|
||||||
libgl-dev libglu-dev libspnav-dev
|
libgl-dev libglu-dev libspnav-dev
|
||||||
|
|
||||||
git submodule update --init extlib/libdxfrw extlib/flatbuffers extlib/q3d
|
git submodule update --init extlib/libdxfrw extlib/flatbuffers extlib/q3d extlib/mimalloc
|
||||||
|
|
|
@ -175,6 +175,14 @@ message(STATUS "Using in-tree q3d")
|
||||||
add_subdirectory(extlib/q3d)
|
add_subdirectory(extlib/q3d)
|
||||||
set(Q3D_INCLUDE_DIR ${CMAKE_BINARY_DIR}/extlib/q3d)
|
set(Q3D_INCLUDE_DIR ${CMAKE_BINARY_DIR}/extlib/q3d)
|
||||||
|
|
||||||
|
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)
|
||||||
|
set(MIMALLOC_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/extlib/mimalloc/include)
|
||||||
|
|
||||||
if(WIN32 OR APPLE)
|
if(WIN32 OR APPLE)
|
||||||
# On Win32 and macOS we use vendored packages, since there is little to no benefit
|
# On Win32 and macOS we use vendored packages, since there is little to no benefit
|
||||||
# to trying to find system versions. In particular, trying to link to libraries from
|
# to trying to find system versions. In particular, trying to link to libraries from
|
||||||
|
|
|
@ -83,7 +83,7 @@ Before building, check out the project and the necessary submodules:
|
||||||
|
|
||||||
git clone https://github.com/solvespace/solvespace
|
git clone https://github.com/solvespace/solvespace
|
||||||
cd solvespace
|
cd solvespace
|
||||||
git submodule update --init extlib/libdxfrw extlib/flatbuffers extlib/q3d
|
git submodule update --init extlib/libdxfrw extlib/flatbuffers extlib/q3d extlib/mimalloc
|
||||||
|
|
||||||
After that, build SolveSpace as following:
|
After that, build SolveSpace as following:
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ Before building, check out the project and the necessary submodules:
|
||||||
|
|
||||||
git clone https://github.com/solvespace/solvespace
|
git clone https://github.com/solvespace/solvespace
|
||||||
cd solvespace
|
cd solvespace
|
||||||
git submodule update --init extlib/libdxfrw extlib/flatbuffers extlib/q3d
|
git submodule update --init extlib/libdxfrw extlib/flatbuffers extlib/q3d extlib/mimalloc
|
||||||
|
|
||||||
After that, build SolveSpace as following:
|
After that, build SolveSpace as following:
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 07c6e60a5a3bd7de09e4a170cd97bafba59cfafd
|
|
@ -45,7 +45,7 @@ parts:
|
||||||
snapcraftctl set-version "$version"
|
snapcraftctl set-version "$version"
|
||||||
git describe --exact-match HEAD && grade="stable" || grade="devel"
|
git describe --exact-match HEAD && grade="stable" || grade="devel"
|
||||||
snapcraftctl set-grade "$grade"
|
snapcraftctl set-grade "$grade"
|
||||||
git submodule update --init extlib/libdxfrw extlib/flatbuffers extlib/q3d
|
git submodule update --init extlib/libdxfrw extlib/flatbuffers extlib/q3d extlib/mimalloc
|
||||||
configflags:
|
configflags:
|
||||||
- -DCMAKE_INSTALL_PREFIX=/usr
|
- -DCMAKE_INSTALL_PREFIX=/usr
|
||||||
- -DCMAKE_BUILD_TYPE=Release
|
- -DCMAKE_BUILD_TYPE=Release
|
||||||
|
|
|
@ -59,7 +59,11 @@ target_include_directories(slvs
|
||||||
PUBLIC ${CMAKE_SOURCE_DIR}/include)
|
PUBLIC ${CMAKE_SOURCE_DIR}/include)
|
||||||
|
|
||||||
target_link_libraries(slvs
|
target_link_libraries(slvs
|
||||||
${util_LIBRARIES})
|
${util_LIBRARIES}
|
||||||
|
mimalloc-static)
|
||||||
|
|
||||||
|
add_dependencies(slvs
|
||||||
|
mimalloc-static)
|
||||||
|
|
||||||
set_target_properties(slvs PROPERTIES
|
set_target_properties(slvs PROPERTIES
|
||||||
PUBLIC_HEADER ${CMAKE_SOURCE_DIR}/include/slvs.h
|
PUBLIC_HEADER ${CMAKE_SOURCE_DIR}/include/slvs.h
|
||||||
|
@ -81,7 +85,8 @@ include_directories(
|
||||||
${PNG_PNG_INCLUDE_DIR}
|
${PNG_PNG_INCLUDE_DIR}
|
||||||
${FREETYPE_INCLUDE_DIRS}
|
${FREETYPE_INCLUDE_DIRS}
|
||||||
${CAIRO_INCLUDE_DIRS}
|
${CAIRO_INCLUDE_DIRS}
|
||||||
${Q3D_INCLUDE_DIR})
|
${Q3D_INCLUDE_DIR}
|
||||||
|
${MIMALLOC_INCLUDE_DIR})
|
||||||
|
|
||||||
if(Backtrace_FOUND)
|
if(Backtrace_FOUND)
|
||||||
include_directories(
|
include_directories(
|
||||||
|
@ -213,7 +218,8 @@ add_library(solvespace-core STATIC
|
||||||
${solvespace_core_SOURCES})
|
${solvespace_core_SOURCES})
|
||||||
|
|
||||||
add_dependencies(solvespace-core
|
add_dependencies(solvespace-core
|
||||||
q3d_header)
|
q3d_header
|
||||||
|
mimalloc-static)
|
||||||
|
|
||||||
target_link_libraries(solvespace-core
|
target_link_libraries(solvespace-core
|
||||||
${OpenMP_CXX_LIBRARIES}
|
${OpenMP_CXX_LIBRARIES}
|
||||||
|
@ -222,7 +228,8 @@ target_link_libraries(solvespace-core
|
||||||
${ZLIB_LIBRARY}
|
${ZLIB_LIBRARY}
|
||||||
${PNG_LIBRARY}
|
${PNG_LIBRARY}
|
||||||
${FREETYPE_LIBRARY}
|
${FREETYPE_LIBRARY}
|
||||||
flatbuffers)
|
flatbuffers
|
||||||
|
mimalloc-static)
|
||||||
|
|
||||||
if(Backtrace_FOUND)
|
if(Backtrace_FOUND)
|
||||||
target_link_libraries(solvespace-core
|
target_link_libraries(solvespace-core
|
||||||
|
|
Loading…
Reference in New Issue