Isolated Heaps caused an increase in reported leaks on the bots
[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/IsoTLS.cpp
23     bmalloc/IsoTLSEntry.cpp
24     bmalloc/IsoTLSLayout.cpp
25     bmalloc/LargeMap.cpp
26     bmalloc/Logging.cpp
27     bmalloc/ObjectType.cpp
28     bmalloc/Scavenger.cpp
29     bmalloc/StaticMutex.cpp
30     bmalloc/VMHeap.cpp
31     bmalloc/bmalloc.cpp
32     bmalloc/mbmalloc.cpp
33 )
34
35 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
36     list(APPEND bmalloc_SOURCES
37         bmalloc/Zone.cpp
38     )
39 endif ()
40
41 set(bmalloc_LIBRARIES
42     ${CMAKE_DL_LIBS}
43 )
44
45 WEBKIT_WRAP_SOURCELIST(${bmalloc_SOURCES})
46 include_directories(${bmalloc_INCLUDE_DIRECTORIES})
47 add_library(bmalloc STATIC ${bmalloc_SOURCES})
48 target_link_libraries(bmalloc ${bmalloc_LIBRARIES})
49 set_target_properties(bmalloc PROPERTIES COMPILE_DEFINITIONS "BUILDING_bmalloc")
50
51 add_library(mbmalloc SHARED bmalloc/mbmalloc.cpp)
52 target_link_libraries(mbmalloc bmalloc ${CMAKE_THREAD_LIBS_INIT} ${bmalloc_LIBRARIES})
53 set_target_properties(mbmalloc PROPERTIES COMPILE_DEFINITIONS "BUILDING_mbmalloc")