Merge remote-tracking branch 'origin/master' into concurrent
This commit is contained in:
@@ -224,6 +224,7 @@ if (DEFINED LIBPROJECT)
|
||||
endif()
|
||||
|
||||
if (TESTS)
|
||||
set(PIP_ROOT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -4,10 +4,12 @@ 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()
|
||||
|
||||
Reference in New Issue
Block a user