-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
68 lines (47 loc) · 1.51 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright (c) 2016 Giorgio Marcias
#
# This software is subject to the simplified BSD license.
#
# Author: Giorgio Marcias
# email: marcias.giorgio@gmail.com
cmake_minimum_required(VERSION 3.3)
project(MPMCThreadPool)
option(ATTACH_SOURCES "When generating an IDE project, add MPMCThreadPool header files to project sources." OFF)
set(extern_dir ${CMAKE_CURRENT_SOURCE_DIR}/extern)
set(hdr_dir ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(hdr_inline_files
${hdr_dir}/MPMCThreadPool/inlines/MPMCThreadPool.inl
)
set_source_files_properties(${hdr_inline_files} PROPERTIES XCODE_EXPLICIT_FILE_TYPE "sourcecode.cpp.h")
source_group("MPMCThreadPool\\inlines" FILES ${hdr_inline_files})
set(hdr_main_files
${hdr_dir}/MPMCThreadPool/MPMCThreadPool.hpp
)
source_group("MPMCThreadPool" FILES ${hdr_main_files})
set(all_hdr ${hdr_inline_files} ${hdr_main_files})
add_library(${PROJECT_NAME} INTERFACE)
set(required_cxx_features
cxx_alias_templates
cxx_auto_type
cxx_constexpr
cxx_decltype
cxx_default_function_template_args
cxx_defaulted_functions
cxx_defaulted_move_initializers
cxx_deleted_functions
cxx_lambdas
cxx_noexcept
cxx_nonstatic_member_init
cxx_nullptr
cxx_range_for
cxx_right_angle_brackets
cxx_rvalue_references
cxx_static_assert
cxx_thread_local
cxx_variadic_templates
)
target_compile_features(${PROJECT_NAME} INTERFACE ${required_cxx_features})
target_include_directories(${PROJECT_NAME} INTERFACE ${hdr_dir} ${extern_dir})
if(ATTACH_SOURCES)
target_sources(${PROJECT_NAME} INTERFACE ${all_hdr})
endif()