Added inter thread communication lib

git-svn-id: svn://db.shs.com.ru/pip@858 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
16 changed files with 1366 additions and 3 deletions

View File

@@ -41,7 +41,8 @@ set(PIP_SRC_USB "src_usb")
set(PIP_SRC_FFTW "src_fftw")
set(PIP_SRC_OPENCL "src_opencl")
set(PIP_SRC_IO_UTILS "src_io_utils")
set(PIP_SRC_DIRS "src_main" "src_crypt" "src_compress" "src_usb" "src_fftw" "src_opencl" "src_io_utils")
set(PIP_SRC_CONCURRENT "src_concurrent")
set(PIP_SRC_DIRS "src_main" "src_crypt" "src_compress" "src_usb" "src_fftw" "src_opencl" "src_io_utils" "src_concurrent")
set(PIP_LIBS_TARGETS pip)
set(LIBS_MAIN)
set(LIBS_STATUS)
@@ -129,7 +130,7 @@ get_filename_component(C_COMPILER "${CMAKE_C_COMPILER}" NAME)
# Sources
# Main lib
set(PIP_FOLDERS "." "core" "containers" "thread" "system" "io_devices" "io_utils" "console" "math" "code" "geo" "resources" "opencl" "crypt" "introspection")
set(PIP_FOLDERS "." "core" "containers" "thread" "system" "io_devices" "io_utils" "console" "math" "code" "geo" "resources" "opencl" "crypt" "introspection" "concurrent")
if(PIP_FREERTOS)
#list(REMOVE_ITEM PIP_FOLDERS "console")
#include_directories("${PIP_SRC_MAIN}/console")
@@ -159,6 +160,8 @@ gather_src("${PIP_SRC_OPENCL}" CPP_LIB_OPENCL HDRS PHDRS)
# IO Utils lib
gather_src("${PIP_SRC_IO_UTILS}" CPP_LIB_IO_UTILS HDRS PHDRS)
gather_src("${PIP_SRC_CONCURRENT}" CPP_LIB_CONCURRENT HDRS PHDRS)
if(PIP_FREERTOS)
add_definitions(-DPIP_FREERTOS)
@@ -472,12 +475,21 @@ if (NOT PIP_FREERTOS)
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
list(APPEND PIP_LIBS_TARGETS pip_io_utils)
set(CONCURRENT_LIBS pip)
add_library(pip_concurrent ${PIP_LIB_TYPE} ${CPP_LIB_CONCURRENT})
target_link_libraries(pip_concurrent ${CONCURRENT_LIBS})
list(APPEND PIP_LIBS_TARGETS pip_concurrent)
# Test program
if(PIP_UTILS)
add_executable(pip_test "main.cpp")
target_link_libraries(pip_test pip)
endif()
# Enable build tests for module concurrent
if(CONCURRENT_TESTING)
add_subdirectory(src_concurrent/test)
endif()
else(NOT PIP_FREERTOS)
message(STATUS "Building PIP with crypt support")
@@ -525,7 +537,7 @@ if(LIB)
#add_custom_target(pip_pch ALL COMMAND ${CMAKE_CXX_COMPILER} -O2 -fPIC -g3 ${CMAKE_INSTALL_PREFIX}/include/pip/pip.h DEPENDS pip SOURCES ${HDRS})
#list(APPEND HDRS "pip.h.gch")
file(GLOB CMAKES "*.cmake")
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
# install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
else()
if(NOT PIP_FREERTOS)
install(TARGETS ${PIP_LIBS_TARGETS} DESTINATION bin)