PerProcess<> should be safe by default
[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/PerProcess.cpp
29     bmalloc/Scavenger.cpp
30     bmalloc/StaticMutex.cpp
31     bmalloc/VMHeap.cpp
32     bmalloc/bmalloc.cpp
33     bmalloc/mbmalloc.cpp
34 )
35
36 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
37     list(APPEND bmalloc_SOURCES
38         bmalloc/ProcessCheck.mm
39         bmalloc/Zone.cpp
40     )
41 endif ()
42
43 set(bmalloc_LIBRARIES
44     ${CMAKE_DL_LIBS}
45 )
46
47 WEBKIT_WRAP_SOURCELIST(${bmalloc_SOURCES})
48 include_directories(${bmalloc_INCLUDE_DIRECTORIES})
49 add_library(bmalloc STATIC ${bmalloc_SOURCES})
50 target_link_libraries(bmalloc ${bmalloc_LIBRARIES})
51 set_target_properties(bmalloc PROPERTIES COMPILE_DEFINITIONS "BUILDING_bmalloc")
52
53 if (DEVELOPER_MODE)
54     add_library(mbmalloc SHARED bmalloc/mbmalloc.cpp)
55     target_link_libraries(mbmalloc bmalloc ${CMAKE_THREAD_LIBS_INIT} ${bmalloc_LIBRARIES})
56     set_target_properties(mbmalloc PROPERTIES COMPILE_DEFINITIONS "BUILDING_mbmalloc")
57 endif ()