mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
Fix whitespace
This mostly deletes trailing spaces. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
ddc9841019
commit
745a34f475
66 changed files with 760 additions and 769 deletions
|
@ -15,7 +15,7 @@ option(MI_ASAN "Compile with address sanitizer support (adds a smal
|
|||
option(MI_USE_CXX "Use the C++ compiler to compile the library (instead of the C compiler)" OFF)
|
||||
option(MI_SEE_ASM "Generate assembly files" OFF)
|
||||
option(MI_OSX_INTERPOSE "Use interpose to override standard malloc on macOS" ON)
|
||||
option(MI_OSX_ZONE "Use malloc zone to override standard malloc on macOS" ON)
|
||||
option(MI_OSX_ZONE "Use malloc zone to override standard malloc on macOS" ON)
|
||||
option(MI_WIN_REDIRECT "Use redirection module ('mimalloc-redirect') on Windows if compiling mimalloc as a DLL" ON)
|
||||
option(MI_LOCAL_DYNAMIC_TLS "Use slightly slower, dlopen-compatible TLS mechanism (Unix)" OFF)
|
||||
option(MI_BUILD_SHARED "Build shared library" ON)
|
||||
|
@ -56,7 +56,7 @@ set(mi_sources
|
|||
# Convenience: set default build type depending on the build directory
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
message(STATUS "")
|
||||
message(STATUS "")
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
if ("${CMAKE_BINARY_DIR}" MATCHES ".*(D|d)ebug$" OR MI_DEBUG_FULL)
|
||||
message(STATUS "No build type selected, default to: Debug")
|
||||
|
@ -88,7 +88,7 @@ if(MI_OVERRIDE)
|
|||
# use zone's on macOS
|
||||
message(STATUS " Use malloc zone to override malloc (MI_OSX_ZONE=ON)")
|
||||
list(APPEND mi_sources src/alloc-override-osx.c)
|
||||
list(APPEND mi_defines MI_OSX_ZONE=1)
|
||||
list(APPEND mi_defines MI_OSX_ZONE=1)
|
||||
if (NOT MI_OSX_INTERPOSE)
|
||||
message(STATUS " WARNING: zone overriding usually also needs interpose (use -DMI_OSX_INTERPOSE=ON)")
|
||||
endif()
|
||||
|
@ -201,12 +201,12 @@ if(MI_DEBUG_TSAN)
|
|||
list(APPEND mi_cflags -fsanitize=thread -g -O1)
|
||||
list(APPEND CMAKE_EXE_LINKER_FLAGS -fsanitize=thread)
|
||||
else()
|
||||
message(WARNING "Can only use thread sanitizer with clang (MI_DEBUG_TSAN=ON but ignored)")
|
||||
endif()
|
||||
message(WARNING "Can only use thread sanitizer with clang (MI_DEBUG_TSAN=ON but ignored)")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MI_DEBUG_UBSAN)
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
message(STATUS "Build with undefined-behavior sanitizer (MI_DEBUG_UBSAN=ON)")
|
||||
list(APPEND mi_cflags -fsanitize=undefined -g -fno-sanitize-recover=undefined)
|
||||
|
@ -216,10 +216,10 @@ if(MI_DEBUG_UBSAN)
|
|||
set(MI_USE_CXX "ON")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "Can only use undefined-behavior sanitizer with clang++ (MI_DEBUG_UBSAN=ON but ignored)")
|
||||
endif()
|
||||
message(WARNING "Can only use undefined-behavior sanitizer with clang++ (MI_DEBUG_UBSAN=ON but ignored)")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "Can only use thread sanitizer with a debug build (CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})")
|
||||
message(WARNING "Can only use thread sanitizer with a debug build (CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -240,7 +240,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU")
|
|||
list(APPEND mi_cflags -Wall -Wextra -Wno-unknown-pragmas -fvisibility=hidden)
|
||||
if(NOT MI_USE_CXX)
|
||||
list(APPEND mi_cflags -Wstrict-prototypes)
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang")
|
||||
list(APPEND mi_cflags -Wpedantic -Wno-static-in-inline)
|
||||
endif()
|
||||
|
@ -272,7 +272,7 @@ if(WIN32)
|
|||
else()
|
||||
set(pc_libraries "")
|
||||
find_library(MI_LIBPTHREAD pthread)
|
||||
if (MI_LIBPTHREAD)
|
||||
if (MI_LIBPTHREAD)
|
||||
list(APPEND mi_libraries ${MI_LIBPTHREAD})
|
||||
set(pc_libraries "${pc_libraries} -pthread")
|
||||
endif()
|
||||
|
@ -282,10 +282,10 @@ else()
|
|||
set(pc_libraries "${pc_libraries} -lrt")
|
||||
endif()
|
||||
find_library(MI_LIBATOMIC atomic)
|
||||
if (NOT MI_LIBATOMIC AND MI_USE_LIBATOMIC)
|
||||
if (NOT MI_LIBATOMIC AND MI_USE_LIBATOMIC)
|
||||
set(MI_LIBATOMIC atomic)
|
||||
endif()
|
||||
if (MI_LIBATOMIC)
|
||||
if (MI_LIBATOMIC)
|
||||
list(APPEND mi_libraries ${MI_LIBATOMIC})
|
||||
set(pc_libraries "${pc_libraries} -latomic")
|
||||
endif()
|
||||
|
@ -302,7 +302,7 @@ set(mi_install_libdir "${CMAKE_INSTALL_LIBDIR}")
|
|||
# are either installed at top level, or use versioned directories for side-by-side installation (default)
|
||||
if (MI_INSTALL_TOPLEVEL)
|
||||
set(mi_install_objdir "${CMAKE_INSTALL_LIBDIR}")
|
||||
set(mi_install_incdir "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
set(mi_install_incdir "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
set(mi_install_cmakedir "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc")
|
||||
else()
|
||||
set(mi_install_objdir "${CMAKE_INSTALL_LIBDIR}/mimalloc-${mi_version}") # for static library and object files
|
||||
|
@ -316,7 +316,7 @@ if(MI_SECURE)
|
|||
endif()
|
||||
if(MI_VALGRIND)
|
||||
set(mi_basename "${mi_basename}-valgrind")
|
||||
endif()
|
||||
endif()
|
||||
if(MI_ASAN)
|
||||
set(mi_basename "${mi_basename}-asan")
|
||||
endif()
|
||||
|
@ -383,7 +383,7 @@ if(MI_BUILD_SHARED)
|
|||
install(FILES "$<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" DESTINATION ${mi_install_libdir})
|
||||
endif()
|
||||
|
||||
install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY)
|
||||
install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY)
|
||||
install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir})
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue