Minor fixes for moving to gcc
This commit is contained in:
parent
2b8accbb55
commit
6952cf9372
@ -1,8 +1,14 @@
|
|||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
|
||||||
project(ThreadPool)
|
project(ThreadPool)
|
||||||
add_library(threadpool_lib "include/ThreadPool.cpp")
|
add_library(threadpool_lib "include/ThreadPool.cpp")
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} "main.cpp")
|
add_executable(${PROJECT_NAME} "main.cpp")
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME} threadpool_lib)
|
target_link_libraries(${PROJECT_NAME} threadpool_lib)
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
target_link_libraries(${PROJECT_NAME} threadpool_lib -pthread)
|
||||||
|
endif(UNIX)
|
||||||
|
@ -19,6 +19,7 @@ it. Using this library is your own responsibility
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <condition_variable>
|
||||||
|
|
||||||
class ThreadPool {
|
class ThreadPool {
|
||||||
long numOfThreads;
|
long numOfThreads;
|
||||||
|
Loading…
Reference in New Issue
Block a user