diff --git a/cpp/deplex/CMakeLists.txt b/cpp/deplex/CMakeLists.txt index 32e2fc5..a777e9b 100644 --- a/cpp/deplex/CMakeLists.txt +++ b/cpp/deplex/CMakeLists.txt @@ -72,6 +72,8 @@ target_include_directories( target_link_libraries(${TARGET_NAME} PUBLIC Eigen3::Eigen) target_link_libraries(${TARGET_NAME} PRIVATE dsyev) target_link_libraries(${TARGET_NAME} PRIVATE rtl) +target_link_libraries(${TARGET_NAME} PUBLIC mimalloc) + if (OpenMP_CXX_FOUND) target_link_libraries(${TARGET_NAME} PRIVATE OpenMP::OpenMP_CXX) endif () diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 4074ee1..6f05ea9 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1,4 +1,5 @@ add_subdirectory(eigen3) +add_subdirectory(mimalloc) if (${BUILD_TESTS}) add_subdirectory(googletest) diff --git a/external/mimalloc/CMakeLists.txt b/external/mimalloc/CMakeLists.txt new file mode 100644 index 0000000..9885fb4 --- /dev/null +++ b/external/mimalloc/CMakeLists.txt @@ -0,0 +1,9 @@ +include(FetchContent) + +FetchContent_Declare( + mimalloc + GIT_REPOSITORY https://github.com/microsoft/mimalloc.git + GIT_TAG v2.1.2 +) + +FetchContent_MakeAvailable(mimalloc) \ No newline at end of file