mirror of
https://github.com/microsoft/mimalloc.git
synced 2024-12-27 13:33:18 +08:00
better cmake process for MI_VALGRIND
This commit is contained in:
parent
05a75758dd
commit
74d002b61c
@ -108,6 +108,9 @@ endif()
|
|||||||
if(MI_SECURE)
|
if(MI_SECURE)
|
||||||
message(STATUS "Set full secure build (MI_SECURE=ON)")
|
message(STATUS "Set full secure build (MI_SECURE=ON)")
|
||||||
list(APPEND mi_defines MI_SECURE=4)
|
list(APPEND mi_defines MI_SECURE=4)
|
||||||
|
#if (MI_VALGRIND)
|
||||||
|
# message(WARNING "Secure mode is a bit weakened when compiling with Valgrind support as buffer overflow detection is no longer byte-precise (if running without valgrind)")
|
||||||
|
#endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MI_VALGRIND)
|
if(MI_VALGRIND)
|
||||||
@ -265,20 +268,18 @@ else()
|
|||||||
set(mi_install_cmakedir "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}") # for cmake package info
|
set(mi_install_cmakedir "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}") # for cmake package info
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(mi_basename "mimalloc")
|
||||||
if(MI_SECURE)
|
if(MI_SECURE)
|
||||||
set(mi_basename "mimalloc-secure")
|
set(mi_basename "${mi_basename}-secure")
|
||||||
else()
|
endif()
|
||||||
if(MI_VALGRIND)
|
if(MI_VALGRIND)
|
||||||
set(mi_basename "mimalloc-valgrind")
|
set(mi_basename "${mi_basename}-valgrind")
|
||||||
else()
|
|
||||||
set(mi_basename "mimalloc")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
|
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
|
||||||
if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
|
if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
|
||||||
set(mi_basename "${mi_basename}-${CMAKE_BUILD_TYPE_LC}") #append build type (e.g. -debug) if not a release version
|
set(mi_basename "${mi_basename}-${CMAKE_BUILD_TYPE_LC}") #append build type (e.g. -debug) if not a release version
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MI_BUILD_SHARED)
|
if(MI_BUILD_SHARED)
|
||||||
list(APPEND mi_build_targets "shared")
|
list(APPEND mi_build_targets "shared")
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user