Skip to content

Commit

Permalink
fix cmake to generate mimalloc.dll on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
daanx committed Dec 20, 2024
1 parent 4ed44f9 commit 26eaa1f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -667,12 +667,7 @@ endif()
# -----------------------------------------------------------------------------
if (MI_OVERRIDE)
if (MI_BUILD_SHARED)
target_compile_definitions(mimalloc PRIVATE MI_MALLOC_OVERRIDE)
if (WIN32)
# on windows we should generate mimalloc-override.dll.
string(REPLACE "mimalloc" "mimalloc-override" mi_override_output_name ${mi_basename})
set_target_properties(mimalloc PROPERTIES OUTPUT_NAME ${mi_override_output_name})
endif()
target_compile_definitions(mimalloc PRIVATE MI_MALLOC_OVERRIDE)
endif()
if(NOT WIN32)
# It is only possible to override malloc on Windows when building as a DLL.
Expand Down

0 comments on commit 26eaa1f

Please sign in to comment.