16 lines
384 B
CMake
16 lines
384 B
CMake
cmake_minimum_required(VERSION 2.8)
|
|
|
|
set (CMAKE_CXX_STANDARD 11)
|
|
|
|
project(ThreadPool)
|
|
add_library(threadpool_lib "include/ThreadPool.cpp")
|
|
|
|
add_executable(${PROJECT_NAME} "main.cpp")
|
|
|
|
target_link_libraries(${PROJECT_NAME} threadpool_lib)
|
|
|
|
if(UNIX)
|
|
target_link_libraries(${PROJECT_NAME} threadpool_lib -pthread)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
endif(UNIX)
|