Files
pip/tests/CMakeLists.txt
Ivan Pelipenko 21111b3e67 move tests to separate dir
create macro "pip_test()" for easily add new tests
2020-07-31 15:47:08 +03:00

16 lines
498 B
CMake

include(DownloadGTest)
macro(pip_test NAME LIBS)
gather_src("${NAME}" CPP_${NAME}_TEST _T_H _T_PH)
set(_target pip_${NAME}_test)
add_executable(${_target} ${CPP_${NAME}_TEST})
target_link_libraries(${_target} pip ${LIBS} gtest_main gmock_main)
add_test(NAME ${_target} COMMAND tests)
add_custom_target(${_target}_perform ALL COMMAND ${_target})
list(APPEND PIP_TESTS_LIST "${NAME}")
set(PIP_TESTS_LIST ${PIP_TESTS_LIST} PARENT_SCOPE)
endmacro()
# Concurrent tests
pip_test(concurrent "")