# Simplify adding a test
# Pass the name of a cpp file and the name of the library to link.
# Optionally some additional args for add_test
function(tiletrace_add_test name library)
    add_executable(${name} ${name}.cpp)
    target_link_libraries(${name} PRIVATE libtiletrace)
    target_include_directories(${name} PRIVATE libtiletrace)
    add_test(NAME ${name} COMMAND ${name} ${ARGV2})
endfunction()

tiletrace_add_test(analysis_integration_test otf2xx ${CMAKE_PROGRAM_PATH}/TRACE_DATA/simple-2/scorep_p2p_2_trace/traces.otf2)
