From 28b2798015633e0186fa2084f9e9803f0fea5ba0 Mon Sep 17 00:00:00 2001 From: saturneric Date: Sun, 28 Jul 2024 22:44:37 +0200 Subject: fix: do not use mimalloc on macos and solve windows build issues on github actions --- third_party/CMakeLists.txt | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'third_party') diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index fa3fbf7a..f6658eb1 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -23,35 +23,35 @@ # # SPDX-License-Identifier: GPL-3.0-or-later - # json set(JSON_BuildTests OFF CACHE INTERNAL "") -if (MINGW) +if(MINGW) add_subdirectory(libarchive EXCLUDE_FROM_ALL) endif() -set(MI_SECURE ON) +if(NOT APPLE) + set(MI_SECURE ON) -# fix the segment fault issue on M1 chip platform -# refer to https://github.com/microsoft/mimalloc/issues/343 -if(APPLE) - set(MI_OSX_ZONE ON) - set(MI_OSX_INTERPOSE OFF) -endif() + # fix the segment fault issue on M1 chip platform + # refer to https://github.com/microsoft/mimalloc/issues/343 + # if(APPLE) + # set(MI_OSX_ZONE ON) + # set(MI_OSX_INTERPOSE OFF) + # endif() -# ASAN checking -if(${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND ENABLE_ASAN) + # ASAN checking + if(${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND ENABLE_ASAN) + # if(APPLE) + # set(MI_OVERRIDE OFF) + # endif() - if(APPLE) - set(MI_OVERRIDE OFF) + # set(MI_TRACK_VALGRIND ON) + set(MI_TRACK_ASAN ON) endif() - # set(MI_TRACK_VALGRIND ON) - set(MI_TRACK_ASAN ON) + add_subdirectory(mimalloc EXCLUDE_FROM_ALL) endif() -add_subdirectory(mimalloc EXCLUDE_FROM_ALL) - set(INSTALL_GTEST OFF) add_subdirectory(googletest EXCLUDE_FROM_ALL) \ No newline at end of file -- cgit v1.2.3