Skip to content

Commit da6b950

Browse files
authored
Remove duplicated mimalloc def (#23695)
### Description Duo to merge conflicts, our cmake scripts accidentally have 3 copies of the same mimalloc definitions. This PR removes the duplicated mimalloc definitions from the cmake scripts. ### Motivation and Context
1 parent 36231ec commit da6b950

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

cmake/external/mimalloc.cmake

-7
This file was deleted.

cmake/external/onnxruntime_external_deps.cmake

+6-10
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ endif()
9191

9292

9393
if(onnxruntime_USE_MIMALLOC)
94+
add_definitions(-DUSE_MIMALLOC)
95+
96+
set(MI_OVERRIDE OFF CACHE BOOL "" FORCE)
97+
set(MI_BUILD_TESTS OFF CACHE BOOL "" FORCE)
98+
set(MI_DEBUG_FULL OFF CACHE BOOL "" FORCE)
99+
set(MI_BUILD_SHARED OFF CACHE BOOL "" FORCE)
94100
onnxruntime_fetchcontent_declare(
95101
mimalloc
96102
URL ${DEP_URL_mimalloc}
@@ -570,16 +576,6 @@ if (onnxruntime_USE_XNNPACK)
570576
endif()
571577
endif()
572578

573-
if (onnxruntime_USE_MIMALLOC)
574-
add_definitions(-DUSE_MIMALLOC)
575-
576-
set(MI_OVERRIDE OFF CACHE BOOL "" FORCE)
577-
set(MI_BUILD_TESTS OFF CACHE BOOL "" FORCE)
578-
set(MI_DEBUG_FULL OFF CACHE BOOL "" FORCE)
579-
set(MI_BUILD_SHARED OFF CACHE BOOL "" FORCE)
580-
onnxruntime_fetchcontent_makeavailable(mimalloc)
581-
endif()
582-
583579
set(onnxruntime_EXTERNAL_LIBRARIES ${onnxruntime_EXTERNAL_LIBRARIES_XNNPACK} ${WIL_TARGET} nlohmann_json::nlohmann_json
584580
onnx onnx_proto ${PROTOBUF_LIB} re2::re2 Boost::mp11 safeint_interface
585581
flatbuffers::flatbuffers ${GSL_TARGET} ${ABSEIL_LIBS} date::date

0 commit comments

Comments
 (0)