blob: ba8e2ed4977019ce79e99d64934021c06a6494ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
include("source/libraries/mimalloc/cmake/mimalloc-config-version.cmake")
set(mimalloc_sources
source/libraries/mimalloc/src/alloc.c
source/libraries/mimalloc/src/alloc-aligned.c
source/libraries/mimalloc/src/alloc-posix.c
source/libraries/mimalloc/src/arena.c
source/libraries/mimalloc/src/bitmap.c
source/libraries/mimalloc/src/heap.c
source/libraries/mimalloc/src/init.c
source/libraries/mimalloc/src/options.c
source/libraries/mimalloc/src/os.c
source/libraries/mimalloc/src/page.c
source/libraries/mimalloc/src/random.c
source/libraries/mimalloc/src/segment.c
source/libraries/mimalloc/src/segment-map.c
source/libraries/mimalloc/src/stats.c
source/libraries/mimalloc/src/prim/prim.c
)
set(mi_cflags "")
set(mi_libraries "")
add_library(mimalloc STATIC ${mimalloc_sources})
# set(CMAKE_C_STANDARD 11)
# set(CMAKE_CXX_STANDARD 17)
target_include_directories(mimalloc PRIVATE
source/libraries/mimalloc
source/libraries/mimalloc/src
source/libraries/mimalloc/prim
source/libraries/mimalloc/include
)
target_compile_definitions(mimalloc PRIVATE
MIMALLOC_LARGE_OS_PAGES=1
MI_DEBUG=0
MI_SECURE=0
)
if (NOT MSVC)
target_compile_options(mimalloc PRIVATE
-Wno-cast-align
-Wno-cast-qual
)
endif ()
|