[bmalloc] IsoHeap should have lower tier using shared IsoPage
[WebKit-https.git] / Source / bmalloc / CMakeLists.txt
1 set_property(DIRECTORY . PROPERTY FOLDER "bmalloc")
2
3 set(bmalloc_INCLUDE_DIRECTORIES
4     "${BMALLOC_DIR}"
5 )
6
7 set(bmalloc_SOURCES
8     bmalloc/AllIsoHeaps.cpp
9     bmalloc/Allocator.cpp
10     bmalloc/AvailableMemory.cpp
11     bmalloc/Cache.cpp
12     bmalloc/CryptoRandom.cpp
13     bmalloc/Deallocator.cpp
14     bmalloc/DebugHeap.cpp
15     bmalloc/Environment.cpp
16     bmalloc/FreeList.cpp
17     bmalloc/Gigacage.cpp
18     bmalloc/Heap.cpp
19     bmalloc/HeapKind.cpp
20     bmalloc/IsoHeapImpl.cpp
21     bmalloc/IsoPage.cpp
22     bmalloc/IsoSharedHeap.cpp
23     bmalloc/IsoSharedPage.cpp
24     bmalloc/IsoTLS.cpp
25     bmalloc/IsoTLSEntry.cpp
26     bmalloc/IsoTLSLayout.cpp
27     bmalloc/LargeMap.cpp
28     bmalloc/Logging.cpp
29     bmalloc/Mutex.cpp
30     bmalloc/ObjectType.cpp
31     bmalloc/PerProcess.cpp
32     bmalloc/PerThread.cpp
33     bmalloc/Scavenger.cpp
34     bmalloc/VMHeap.cpp
35     bmalloc/bmalloc.cpp
36     bmalloc/mbmalloc.cpp
37 )
38
39 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
40     list(APPEND bmalloc_SOURCES
41         bmalloc/Zone.cpp
42     )
43 endif ()
44
45 set(bmalloc_LIBRARIES
46     ${CMAKE_DL_LIBS}
47 )
48
49 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
50
51 WEBKIT_WRAP_SOURCELIST(${bmalloc_SOURCES})
52 include_directories(${bmalloc_INCLUDE_DIRECTORIES})
53 add_library(bmalloc STATIC ${bmalloc_SOURCES})
54 target_link_libraries(bmalloc ${bmalloc_LIBRARIES})
55 set_target_properties(bmalloc PROPERTIES COMPILE_DEFINITIONS "BUILDING_bmalloc")
56
57 if (DEVELOPER_MODE)
58     add_library(mbmalloc SHARED bmalloc/mbmalloc.cpp)
59     target_link_libraries(mbmalloc bmalloc ${CMAKE_THREAD_LIBS_INIT} ${bmalloc_LIBRARIES})
60     set_target_properties(mbmalloc PROPERTIES COMPILE_DEFINITIONS "BUILDING_mbmalloc")
61 endif ()