-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
43 lines (35 loc) · 1.34 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
cmake_minimum_required(VERSION 3.12)
project(
LockfreeQueue
VERSION 0.1
LANGUAGES C CXX
DESCRIPTION "Lockfree MPSC and MPMC Queue Implementation")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
option(ENABLE_CLANG_TIDY "Enable clang-tidy analysis." OFF)
if(ENABLE_CLANG_TIDY)
set(CMAKE_CXX_CLANG_TIDY clang-tidy;)
endif(ENABLE_CLANG_TIDY)
option(ENABLE_IWYU "Enable Include What You Use analysis." OFF)
if(ENABLE_IWYU)
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE
include-what-you-use;-Xiwyu;cxx17ns;-Xiwyu;transitive_includes_only;)
endif(ENABLE_IWYU)
option(ENABLE_CPPCHECK "Enable cppcheck analysis." OFF)
if(ENABLE_CPPCHECK)
file(WRITE ${CMAKE_BINARY_DIR}/cppcheck-supression-list.txt
"missingIncludeSystem\npreprocessorErrorDirective\n")
set(CMAKE_CXX_CPPCHECK "cppcheck" ; --quiet;--enable=all;--inline-suppr;
--suppressions-list=${CMAKE_BINARY_DIR}/cppcheck-supression-list.txt)
endif(ENABLE_CPPCHECK)
include(SanitizerFlags)
include(WarningFlags)
add_subdirectory(src)
add_subdirectory(bench)
add_subdirectory(test)