move tests to separate dir
create macro "pip_test()" for easily add new tests
This commit is contained in:
15
tests/CMakeLists.txt
Normal file
15
tests/CMakeLists.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
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 "")
|
||||
Reference in New Issue
Block a user