The CMakeLists.txt will now handle different casin on CMAKE_BUILD_TYPE when matching text.

This commit is contained in:
zerodefect 2019-11-14 11:09:17 +00:00
parent c83902fb79
commit f8f7f89fee

View file

@ -102,9 +102,9 @@ if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU")
endif() endif()
endif() endif()
if(NOT(CMAKE_BUILD_TYPE MATCHES "Release|release|RelWithDebInfo|relwithdebinfo")) string(TOLOWER "${CMAKE_BUILD_TYPE}" LOWERCASE_CMAKE_BUILD_TYPE)
string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type) if(NOT(LOWERCASE_CMAKE_BUILD_TYPE MATCHES "^(release|relwithdebinfo|minsizerel)$"))
set(mi_basename "mimalloc-${build_type}") set(mi_basename "mimalloc-${LOWERCASE_CMAKE_BUILD_TYPE}")
else() else()
if(MI_SECURE MATCHES "ON") if(MI_SECURE MATCHES "ON")
set(mi_basename "mimalloc-secure") set(mi_basename "mimalloc-secure")