mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
optimized numa calls; better Linux support
This commit is contained in:
parent
57dd69265a
commit
2c12d7f223
7 changed files with 97 additions and 43 deletions
|
@ -1,6 +1,8 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project(libmimalloc C CXX)
|
||||
include("cmake/mimalloc-config-version.cmake")
|
||||
include("CheckIncludeFile")
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
|
@ -88,6 +90,16 @@ if(MI_USE_CXX MATCHES "ON")
|
|||
set_source_files_properties(src/static.c test/test-api.c PROPERTIES LANGUAGE CXX )
|
||||
endif()
|
||||
|
||||
CHECK_INCLUDE_FILE("numaif.h" MI_HAVE_NUMA_H)
|
||||
if(MI_HAVE_NUMA_H)
|
||||
list(APPEND mi_defines MI_HAS_NUMA)
|
||||
list(APPEND mi_libraries numa)
|
||||
else()
|
||||
if (NOT(WIN32))
|
||||
message(WARNING "Compiling without using NUMA optimized allocation (on Linux, install libnuma-dev?)")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Compiler flags
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU")
|
||||
list(APPEND mi_cflags -Wall -Wextra -Wno-unknown-pragmas)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue