[CMake] Use WEBKIT_EXECUTABLE in MallocBench
[WebKit-https.git] / PerformanceTests / MallocBench / MallocBench / CMakeLists.txt
1 set(MallocBench_SOURCES
2     Benchmark.cpp
3     CPUCount.cpp
4     CommandLine.cpp
5     Interpreter.cpp
6     Memory.cpp
7     alloc_free.cpp
8     balloon.cpp
9     big.cpp
10     churn.cpp
11     facebook.cpp
12     flickr.cpp
13     fragment.cpp
14     list.cpp
15     main.cpp
16     medium.cpp
17     message.cpp
18     nimlang.cpp
19     realloc.cpp
20     reddit.cpp
21     stress.cpp
22     stress_aligned.cpp
23     theverge.cpp
24     tree.cpp
25 )
26
27 set(MallocBench_PRIVATE_INCLUDE_DIRECTORIES
28     ${CMAKE_BINARY_DIR}
29     ${bmalloc_FRAMEWORK_HEADERS_DIR}
30 )
31
32 set(MallocBench_PRIVATE_LIBRARIES
33     ${CMAKE_DL_LIBS}
34     Threads::Threads
35     mbmalloc
36 )
37
38 set(MallocBench_DEPENDENCIES sysmalloc)
39
40 set(MallocBench_OPS
41     facebook.ops
42     flickr.ops
43     flickr_memory_warning.ops
44     nimlang.ops
45     reddit.ops
46     reddit_memory_warning.ops
47     theverge.ops
48     theverge_memory_warning.ops
49 )
50
51 WEBKIT_EXECUTABLE_DECLARE(MallocBench)
52 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
53
54 set(CMAKE_SKIP_BUILD_RPATH ON)
55 add_library(sysmalloc SHARED mbmalloc.cpp)
56 set_target_properties(sysmalloc PROPERTIES OUTPUT_NAME "mbmalloc")
57 set_target_properties(sysmalloc PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib/system/)
58
59 file(COPY
60     ${MallocBench_OPS}
61     DESTINATION
62     ${PROJECT_BINARY_DIR}
63 )
64
65 WEBKIT_WRAP_SOURCELIST(${MallocBench_SOURCES})
66 WEBKIT_EXECUTABLE(MallocBench)