xref: /5.5.2/phosphor/tests/module/CMakeLists.txt (revision 777a8819)
1MACRO (M_ADD_MODULE_GTEST name)
2    ADD_EXECUTABLE(
3            ${name}
4            ${phosphor_SOURCE_DIR}/tests/test_main.cc
5            ${ARGN}
6    )
7    TARGET_LINK_LIBRARIES(${name}
8            gmock
9            gtest
10            ${_extra_test_libs})
11    ADD_TEST(NAME ${name} COMMAND ${name})
12ENDMACRO()
13
14M_ADD_MODULE_GTEST(category_registry_test
15        category_registry_test.cc
16        ${phosphor_SOURCE_DIR}/src/category_registry.cc
17        ${phosphor_SOURCE_DIR}/src/utils/string_utils.cc)
18
19M_ADD_MODULE_GTEST(chunk_lock_test
20        chunk_lock_test.cc
21        ${phosphor_SOURCE_DIR}/src/chunk_lock.cc)
22
23M_ADD_LIBRARY_GTEST(export_test
24        export_test.cc)
25
26M_ADD_MODULE_GTEST(memory_test
27        memory_test.cc)
28
29M_ADD_MODULE_GTEST(sentinel_test
30        sentinel_test.cc
31        ${phosphor_SOURCE_DIR}/src/sentinel.cc)
32
33M_ADD_MODULE_GTEST(string_utils_test
34        string_utils_test.cc
35        ${phosphor_SOURCE_DIR}/src/utils/string_utils.cc)
36
37M_ADD_MODULE_GTEST(trace_argument_test
38        trace_argument_test.cc
39        ${phosphor_SOURCE_DIR}/src/utils/string_utils.cc)
40
41M_ADD_MODULE_GTEST(trace_event_test
42        trace_event_test.cc
43        ${phosphor_SOURCE_DIR}/src/trace_event.cc
44        ${phosphor_SOURCE_DIR}/src/platform/thread.cc
45        ${phosphor_SOURCE_DIR}/src/utils/string_utils.cc)
46
47M_ADD_MODULE_GTEST(trace_buffer_test
48        trace_buffer_test.cc
49        ${phosphor_SOURCE_DIR}/src/sentinel.cc
50        ${phosphor_SOURCE_DIR}/src/trace_event.cc
51        ${phosphor_SOURCE_DIR}/src/trace_buffer.cc
52        ${phosphor_SOURCE_DIR}/src/platform/thread.cc
53        ${phosphor_SOURCE_DIR}/src/utils/string_utils.cc)
54
55M_ADD_LIBRARY_GTEST(trace_config_test
56        trace_config_test.cc)
57
58M_ADD_LIBRARY_GTEST(trace_log_test
59        trace_log_test.cc)
60