@@ -15,7 +15,7 @@ option(MI_ASAN "Compile with address sanitizer support (adds a smal
1515option (MI_USE_CXX "Use the C++ compiler to compile the library (instead of the C compiler)" OFF )
1616option (MI_SEE_ASM "Generate assembly files" OFF )
1717option (MI_OSX_INTERPOSE "Use interpose to override standard malloc on macOS" ON )
18- option (MI_OSX_ZONE "Use malloc zone to override standard malloc on macOS" ON )
18+ option (MI_OSX_ZONE "Use malloc zone to override standard malloc on macOS" ON )
1919option (MI_WIN_REDIRECT "Use redirection module ('mimalloc-redirect') on Windows if compiling mimalloc as a DLL" ON )
2020option (MI_LOCAL_DYNAMIC_TLS "Use slightly slower, dlopen-compatible TLS mechanism (Unix)" OFF )
2121option (MI_BUILD_SHARED "Build shared library" ON )
@@ -56,7 +56,7 @@ set(mi_sources
5656# Convenience: set default build type depending on the build directory
5757# -----------------------------------------------------------------------------
5858
59- message (STATUS "" )
59+ message (STATUS "" )
6060if (NOT CMAKE_BUILD_TYPE )
6161 if ("${CMAKE_BINARY_DIR} " MATCHES ".*(D|d)ebug$" OR MI_DEBUG_FULL)
6262 message (STATUS "No build type selected, default to: Debug" )
@@ -88,7 +88,7 @@ if(MI_OVERRIDE)
8888 # use zone's on macOS
8989 message (STATUS " Use malloc zone to override malloc (MI_OSX_ZONE=ON)" )
9090 list (APPEND mi_sources src/alloc-override-osx.c)
91- list (APPEND mi_defines MI_OSX_ZONE=1)
91+ list (APPEND mi_defines MI_OSX_ZONE=1)
9292 if (NOT MI_OSX_INTERPOSE)
9393 message (STATUS " WARNING: zone overriding usually also needs interpose (use -DMI_OSX_INTERPOSE=ON)" )
9494 endif ()
@@ -201,12 +201,12 @@ if(MI_DEBUG_TSAN)
201201 list (APPEND mi_cflags -fsanitize=thread -g -O1)
202202 list (APPEND CMAKE_EXE_LINKER_FLAGS -fsanitize=thread)
203203 else ()
204- message (WARNING "Can only use thread sanitizer with clang (MI_DEBUG_TSAN=ON but ignored)" )
205- endif ()
204+ message (WARNING "Can only use thread sanitizer with clang (MI_DEBUG_TSAN=ON but ignored)" )
205+ endif ()
206206endif ()
207207
208208if (MI_DEBUG_UBSAN)
209- if (CMAKE_BUILD_TYPE MATCHES "Debug" )
209+ if (CMAKE_BUILD_TYPE MATCHES "Debug" )
210210 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
211211 message (STATUS "Build with undefined-behavior sanitizer (MI_DEBUG_UBSAN=ON)" )
212212 list (APPEND mi_cflags -fsanitize=undefined -g -fno-sanitize-recover=undefined)
@@ -216,10 +216,10 @@ if(MI_DEBUG_UBSAN)
216216 set (MI_USE_CXX "ON" )
217217 endif ()
218218 else ()
219- message (WARNING "Can only use undefined-behavior sanitizer with clang++ (MI_DEBUG_UBSAN=ON but ignored)" )
220- endif ()
219+ message (WARNING "Can only use undefined-behavior sanitizer with clang++ (MI_DEBUG_UBSAN=ON but ignored)" )
220+ endif ()
221221 else ()
222- message (WARNING "Can only use thread sanitizer with a debug build (CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} )" )
222+ message (WARNING "Can only use thread sanitizer with a debug build (CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} )" )
223223 endif ()
224224endif ()
225225
@@ -240,7 +240,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU")
240240 list (APPEND mi_cflags -Wall -Wextra -Wno-unknown-pragmas -fvisibility=hidden)
241241 if (NOT MI_USE_CXX)
242242 list (APPEND mi_cflags -Wstrict-prototypes)
243- endif ()
243+ endif ()
244244 if (CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang" )
245245 list (APPEND mi_cflags -Wpedantic -Wno-static -in-inline)
246246 endif ()
@@ -272,7 +272,7 @@ if(WIN32)
272272else ()
273273 set (pc_libraries "" )
274274 find_library (MI_LIBPTHREAD pthread)
275- if (MI_LIBPTHREAD)
275+ if (MI_LIBPTHREAD)
276276 list (APPEND mi_libraries ${MI_LIBPTHREAD} )
277277 set (pc_libraries "${pc_libraries} -pthread" )
278278 endif ()
@@ -282,10 +282,10 @@ else()
282282 set (pc_libraries "${pc_libraries} -lrt" )
283283 endif ()
284284 find_library (MI_LIBATOMIC atomic)
285- if (NOT MI_LIBATOMIC AND MI_USE_LIBATOMIC)
285+ if (NOT MI_LIBATOMIC AND MI_USE_LIBATOMIC)
286286 set (MI_LIBATOMIC atomic)
287287 endif ()
288- if (MI_LIBATOMIC)
288+ if (MI_LIBATOMIC)
289289 list (APPEND mi_libraries ${MI_LIBATOMIC} )
290290 set (pc_libraries "${pc_libraries} -latomic" )
291291 endif ()
@@ -302,7 +302,7 @@ set(mi_install_libdir "${CMAKE_INSTALL_LIBDIR}")
302302# are either installed at top level, or use versioned directories for side-by-side installation (default)
303303if (MI_INSTALL_TOPLEVEL)
304304 set (mi_install_objdir "${CMAKE_INSTALL_LIBDIR} " )
305- set (mi_install_incdir "${CMAKE_INSTALL_INCLUDEDIR} " )
305+ set (mi_install_incdir "${CMAKE_INSTALL_INCLUDEDIR} " )
306306 set (mi_install_cmakedir "${CMAKE_INSTALL_LIBDIR} /cmake/mimalloc" )
307307else ()
308308 set (mi_install_objdir "${CMAKE_INSTALL_LIBDIR} /mimalloc-${mi_version} " ) # for static library and object files
@@ -316,7 +316,7 @@ if(MI_SECURE)
316316endif ()
317317if (MI_VALGRIND)
318318 set (mi_basename "${mi_basename} -valgrind" )
319- endif ()
319+ endif ()
320320if (MI_ASAN)
321321 set (mi_basename "${mi_basename} -asan" )
322322endif ()
@@ -383,7 +383,7 @@ if(MI_BUILD_SHARED)
383383 install (FILES "$<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX} .dll" DESTINATION ${mi_install_libdir} )
384384 endif ()
385385
386- install (TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY)
386+ install (TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY)
387387 install (EXPORT mimalloc DESTINATION ${mi_install_cmakedir} )
388388endif ()
389389
0 commit comments