xref: /6.6.0/phosphor/tests/library/CMakeLists.txt (revision 5dfc7d22)
1# The memory usage test doesn't compile under ThreadSanitizer
2# / AddressSanitizer as they both try to override the default
3# 'new' operator so don't try to compile the test.
4IF (NOT (CB_THREADSANITIZER OR CB_ADDRESSSANITIZER))
5    # Note: not using M_ADD_LIBRARY_GTEST as we cannot link against platform
6    # here (for the same reason as we can't run under TSan / ASan).
7    ADD_EXECUTABLE(
8            memory_usage_test
9            memory_usage_test.cc
10            ${phosphor_SOURCE_DIR}/tests/test_main.cc)
11    TARGET_LINK_LIBRARIES(memory_usage_test
12            gmock gtest phosphor)
13    ADD_TEST(NAME memory_usage_test COMMAND memory_usage_test)
14ENDIF()
15
16M_ADD_LIBRARY_GTEST(macro_test
17            macro_disabled_test.cc
18            macro_test.cc
19            macro_test.h)
20
21M_ADD_LIBRARY_GTEST(threaded_test
22        threaded_test.cc)
23