Add concurrent library support
This commit is contained in:
@@ -7,6 +7,7 @@ project(multithread_experiments)
|
||||
if (DEFINED PATH_TO_SMSDK OR DEFINED ENV{SMSDK_DIR})
|
||||
find_package(SM REQUIRED)
|
||||
endif()
|
||||
find_package(Concurrent QUIET)
|
||||
|
||||
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -fPIC -std=c++11")
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
add_subdirectory(can)
|
||||
add_subdirectory(pip)
|
||||
#add_subdirectory(concurrent)
|
||||
|
||||
if (Concurrent_FOUND)
|
||||
add_subdirectory(concurrent)
|
||||
endif()
|
||||
|
||||
if (DEFINED PATH_TO_SMSDK OR DEFINED ENV{SMSDK_DIR})
|
||||
add_subdirectory(sm)
|
||||
|
||||
6
experiments/concurrent/CMakeLists.txt
Normal file
6
experiments/concurrent/CMakeLists.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
find_package(Concurrent REQUIRED)
|
||||
|
||||
add_executable(packaged_task packaged_task.cpp)
|
||||
|
||||
add_executable(queues queues.cpp)
|
||||
target_link_libraries(queues concurrent)
|
||||
5
experiments/concurrent/queues.cpp
Normal file
5
experiments/concurrent/queues.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
#include <blockingdequeue.h>
|
||||
|
||||
int main() {
|
||||
// TODO
|
||||
}
|
||||
Reference in New Issue
Block a user