Files
pip/tests/CMakeLists.txt
2020-10-02 15:04:15 +03:00

20 lines
628 B
CMake

include(DownloadGTest)
macro(pip_test NAME LIBS)
file(GLOB _CPPS "${NAME}/*.cpp")
file(GLOB _HDRS "${NAME}/*.h")
set(_target pip_${NAME}_test)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PIP_ROOT_BINARY_DIR}")
add_executable(${_target} ${_CPPS} ${_HDRS})
target_link_libraries(${_target} pip ${LIBS} gtest_main gmock_main)
add_test(NAME ${_target} COMMAND tests)
add_custom_target(${_target}_perform ALL COMMAND ${_target})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
list(APPEND PIP_TESTS_LIST "${NAME}")
set(PIP_TESTS_LIST ${PIP_TESTS_LIST} PARENT_SCOPE)
endmacro()
# Concurrent tests
pip_test(concurrent "")
pip_test(math "")