-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
30 lines (23 loc) · 904 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cmake_minimum_required(VERSION 3.20)
project(thread_pool_c C CXX)
# Uncomment this line if you need some serious debugging of the make process
#set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_C_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
# Add the cmake modules directory to call functions in them
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
# Include the deps
include(deps)
include(build_utils)
# Compile the library
add_library(thread_pool SHARED thread_pool.c)
set_project_properties(thread_pool ${PROJECT_SOURCE_DIR})
# Flag is used to build the gtest binaries
option(BUILD_THPOOL_GTEST "Build GTests for thread_pool_c" ON)
if (BUILD_THPOOL_GTEST)
# If debug is enabled make sure to include CTest at the root. This will allow
# the ctest config to be placed at the root of the build directory
IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
include(CTest)
ENDIF()
ENDIF()