Warning, /sdk/heaptrack/tests/auto/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 0002 set(CMAKE_BUILD_TYPE Debug) 0003 configure_file(tst_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/tst_config.h @ONLY) 0004 0005 include_directories( 0006 ${CMAKE_CURRENT_SOURCE_DIR} 0007 ${CMAKE_CURRENT_BINARY_DIR} 0008 ${CMAKE_CURRENT_SOURCE_DIR}/../../ 0009 ${CMAKE_CURRENT_SOURCE_DIR}/../../src 0010 ${CMAKE_CURRENT_BINARY_DIR}/../../src/ 0011 ${CMAKE_CURRENT_SOURCE_DIR}/../../src/track 0012 ) 0013 0014 if ("${Boost_FILESYSTEM_FOUND}" AND "${Boost_SYSTEM_FOUND}") 0015 if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") 0016 set(LIBUTIL_LIBRARY "util") 0017 endif() 0018 0019 include_directories( 0020 ${Boost_INCLUDE_DIRS} 0021 ) 0022 endif() 0023 0024 # tst_inject isn't asan-safe, so include it before we enable sanitizers 0025 add_subdirectory(no_asan) 0026 0027 if (ECM_FOUND) 0028 include(ECMEnableSanitizers) 0029 endif() 0030 0031 add_executable(tst_trace tst_trace.cpp ../../src/interpret/dwarfdiecache.cpp) 0032 set_target_properties(tst_trace PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${BIN_INSTALL_DIR}") 0033 target_link_libraries(tst_trace 0034 PRIVATE 0035 heaptrack_unwind 0036 Threads::Threads 0037 ${LIBDW_LIBRARIES} 0038 tsl::robin_map 0039 ) 0040 target_include_directories(tst_trace PRIVATE ${LIBDW_INCLUDE_DIRS} ) 0041 0042 add_test(NAME tst_trace COMMAND tst_trace) 0043 0044 if ("${Boost_FILESYSTEM_FOUND}" AND "${Boost_SYSTEM_FOUND}") 0045 add_executable(tst_libheaptrack 0046 tst_libheaptrack.cpp 0047 ../../src/track/libheaptrack.cpp) 0048 set_target_properties(tst_libheaptrack PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${BIN_INSTALL_DIR}") 0049 target_link_libraries(tst_libheaptrack 0050 LINK_PRIVATE 0051 ${CMAKE_DL_LIBS} 0052 ${CMAKE_THREAD_LIBS_INIT} 0053 ${LIBUTIL_LIBRARY} 0054 heaptrack_unwind 0055 rt 0056 ${Boost_SYSTEM_LIBRARY} 0057 ${Boost_FILESYSTEM_LIBRARY} 0058 ) 0059 add_test(NAME tst_libheaptrack COMMAND tst_libheaptrack) 0060 0061 add_executable(tst_io tst_io.cpp) 0062 set_target_properties(tst_io PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${BIN_INSTALL_DIR}") 0063 target_link_libraries(tst_io 0064 ${Boost_SYSTEM_LIBRARY} 0065 ${Boost_FILESYSTEM_LIBRARY} 0066 ) 0067 add_test(NAME tst_io COMMAND tst_io) 0068 0069 if (TARGET heaptrack_gui_private) 0070 find_package(Qt${QT_VERSION_MAJOR} ${QT_MIN_VERSION} CONFIG OPTIONAL_COMPONENTS Test) 0071 if (Qt${QT_VERSION_MAJOR}Test_FOUND) 0072 add_executable(tst_parser tst_parser.cpp) 0073 set_target_properties(tst_parser PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${BIN_INSTALL_DIR}") 0074 target_link_libraries(tst_parser 0075 ${Boost_SYSTEM_LIBRARY} 0076 ${Boost_FILESYSTEM_LIBRARY} 0077 heaptrack_gui_private 0078 Qt${QT_VERSION_MAJOR}::Test 0079 ) 0080 add_test(NAME tst_parser COMMAND tst_parser) 0081 endif() 0082 endif() 0083 endif()