Disabled detach head message && move concurrent test logic to main cmake
git-svn-id: svn://db.shs.com.ru/pip@874 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -53,6 +53,10 @@ set(PIP_LIBS_TARGETS pip)
|
|||||||
set(LIBS_MAIN)
|
set(LIBS_MAIN)
|
||||||
set(LIBS_STATUS)
|
set(LIBS_STATUS)
|
||||||
|
|
||||||
|
if (TESTS)
|
||||||
|
set(PIP_SRC_CONCURRENT_TEST "src_concurrent/test")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (DEFINED ENV{QNX_HOST} OR PIP_FREERTOS)
|
if (DEFINED ENV{QNX_HOST} OR PIP_FREERTOS)
|
||||||
set(STATIC_LIB ON)
|
set(STATIC_LIB ON)
|
||||||
endif()
|
endif()
|
||||||
@@ -162,8 +166,10 @@ gather_src("${PIP_SRC_OPENCL}" CPP_LIB_OPENCL HDRS PHDRS)
|
|||||||
# IO Utils lib
|
# IO Utils lib
|
||||||
gather_src("${PIP_SRC_IO_UTILS}" CPP_LIB_IO_UTILS HDRS PHDRS)
|
gather_src("${PIP_SRC_IO_UTILS}" CPP_LIB_IO_UTILS HDRS PHDRS)
|
||||||
|
|
||||||
|
# Concurrent lib
|
||||||
gather_src("${PIP_SRC_CONCURRENT}" CPP_LIB_CONCURRENT HDRS PHDRS)
|
gather_src("${PIP_SRC_CONCURRENT}" CPP_LIB_CONCURRENT HDRS PHDRS)
|
||||||
|
|
||||||
|
gather_src("${PIP_SRC_CONCURRENT_TEST}" CPP_CONCURRENT_TEST HDRS PHDRS)
|
||||||
|
|
||||||
if(PIP_FREERTOS)
|
if(PIP_FREERTOS)
|
||||||
add_definitions(-DPIP_FREERTOS)
|
add_definitions(-DPIP_FREERTOS)
|
||||||
@@ -493,7 +499,10 @@ if (NOT PIP_FREERTOS)
|
|||||||
|
|
||||||
# Enable build tests for concurrent module
|
# Enable build tests for concurrent module
|
||||||
if(CONCURRENT_TESTS)
|
if(CONCURRENT_TESTS)
|
||||||
add_subdirectory(src_concurrent/test)
|
add_executable(pip_concurrent_test ${CPP_CONCURRENT_TEST})
|
||||||
|
target_link_libraries(pip_concurrent_test gtest_main gmock_main pip_concurrent)
|
||||||
|
add_test(NAME pip_concurrent_test COMMAND tests)
|
||||||
|
add_custom_target(pip_concurrent_test_perform ALL COMMAND pip_concurrent_test)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Test program
|
# Test program
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ include(ExternalProject)
|
|||||||
ExternalProject_Add(googletest
|
ExternalProject_Add(googletest
|
||||||
GIT_REPOSITORY https://github.com/google/googletest.git
|
GIT_REPOSITORY https://github.com/google/googletest.git
|
||||||
GIT_TAG "dea0216d0c6bc5e63cf5f6c8651cd268668032ec"
|
GIT_TAG "dea0216d0c6bc5e63cf5f6c8651cd268668032ec"
|
||||||
|
GIT_CONFIG "advice.detachedHead=false"
|
||||||
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
|
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
|
||||||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
|
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
|
||||||
CONFIGURE_COMMAND ""
|
CONFIGURE_COMMAND ""
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
project(concurrent_test)
|
|
||||||
|
|
||||||
file(GLOB_RECURSE CPPS "*.cpp")
|
|
||||||
#find_package(GTest REQUIRED)
|
|
||||||
#message(STATUS "GTEST_INCLUDES: ${GTEST_INCLUDES}")
|
|
||||||
include_directories(${PROJECT_BINARY_DIR})
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${CPPS})
|
|
||||||
target_link_libraries(${PROJECT_NAME} gtest_main gmock_main pip_concurrent)
|
|
||||||
add_test(NAME ${PROJECT_NAME}_test COMMAND tests)
|
|
||||||
|
|
||||||
ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:pip_concurrent> ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
add_custom_target(${PROJECT_NAME}_perform ALL COMMAND ${PROJECT_NAME})
|
|
||||||
Reference in New Issue
Block a user