-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
607 additions
and
611 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
boost* | ||
build* | ||
thread_pool-build* | ||
*.pro.user | ||
*.user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
|
||
project(thread-pool-cpp CXX) | ||
|
||
list(APPEND CMAKE_MODULE_PATH | ||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") | ||
|
||
project(thread-pool-cpp) | ||
add_definitions(-std=c++14 -Wall -Werror -O3) | ||
|
||
add_definitions(-std=c++14 -Wall -Werror) | ||
|
||
# Get all include files | ||
set(THREAD_POOL_CPP_INC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/") | ||
include_directories("${THREAD_POOL_CPP_INC_DIR}") | ||
file(GLOB_RECURSE INSTALL_FILES_LIST "${THREAD_POOL_CPP_INC_DIR}/*") | ||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) | ||
|
||
add_subdirectory(tests) | ||
add_subdirectory(benchmark) | ||
|
||
# Install as header-only library | ||
file(GLOB_RECURSE INSTALL_FILES_LIST "${CMAKE_CURRENT_SOURCE_DIR}/include/*") | ||
set_source_files_properties(${INSTALL_FILES_LIST} PROPERTIES HEADER_FILE_ONLY 1) | ||
add_library(HEADER_ONLY_TARGET STATIC ${INSTALL_FILES_LIST}) | ||
set_target_properties(HEADER_ONLY_TARGET PROPERTIES LINKER_LANGUAGE CXX) | ||
install(DIRECTORY ${THREAD_POOL_CPP_INC_DIR} DESTINATION "include") | ||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/" DESTINATION "include") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
#benchmark | ||
|
||
include_directories("${THREAD_POOL_CPP_INC_DIR}") | ||
|
||
find_package(Boost REQUIRED COMPONENTS system) | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}) | ||
include_directories(${Boost_INCLUDE_DIR}) | ||
|
||
add_executable(benchmark benchmark.cpp) | ||
target_link_libraries(benchmark ${Boost_LIBRARIES} pthread) | ||
target_link_libraries(benchmark pthread) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#pragma once | ||
|
||
#include "./thread_pool/thread_pool.hpp" | ||
#include <thread_pool/thread_pool.hpp> |
Oops, something went wrong.