1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 11:19:50 +03:00
aports/testing/mimalloc2/cmake-add-insecure-suffix.patch
2022-03-16 08:57:28 +00:00

38 lines
1.2 KiB
Diff

Updated: 20 Feb 2021 by Nicolas Lorin <androw95220@gmail.com>
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Thu, 19 Aug 2021 23:08:13 +0200
Subject: Add suffix "-insecure" to library with MI_SECURE=OFF
We want to make the secure variant the default one.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,12 +63,7 @@
endif()
endif()
-if("${CMAKE_BINARY_DIR}" MATCHES ".*(S|s)ecure$")
- message(STATUS "Default to secure build")
- set(MI_SECURE "ON")
-endif()
-
# -----------------------------------------------------------------------------
# Process options
# -----------------------------------------------------------------------------
@@ -254,12 +249,12 @@
if(MI_SECURE)
set(mi_basename "mimalloc-secure")
else()
- set(mi_basename "mimalloc")
+ set(mi_basename "mimalloc-insecure")
endif()
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
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 "mimalloc-${CMAKE_BUILD_TYPE_LC}") #append build type (e.g. -debug) if not a release version
endif()
if(MI_BUILD_SHARED)
list(APPEND mi_build_targets "shared")