2017-06-06 17:02:45 +00:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
2017-06-08 18:00:46 +00:00
|
|
|
set (CMAKE_CXX_STANDARD 11)
|
2017-06-08 05:34:06 +00:00
|
|
|
|
2017-06-06 17:02:45 +00:00
|
|
|
project(ThreadPool)
|
2017-06-06 17:07:50 +00:00
|
|
|
add_library(threadpool_lib "include/ThreadPool.cpp")
|
2017-06-06 17:02:45 +00:00
|
|
|
|
|
|
|
add_executable(${PROJECT_NAME} "main.cpp")
|
|
|
|
|
|
|
|
target_link_libraries(${PROJECT_NAME} threadpool_lib)
|
2017-06-08 05:34:06 +00:00
|
|
|
|
|
|
|
if(UNIX)
|
|
|
|
target_link_libraries(${PROJECT_NAME} threadpool_lib -pthread)
|
2017-06-09 05:30:19 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
2017-06-08 05:34:06 +00:00
|
|
|
endif(UNIX)
|