-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (29 loc) · 1.31 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
cmake_minimum_required(VERSION 3.8)
enable_testing()
project (readerlib VERSION 0.1.0)
set (LIBNAME "readerlib")
set (STATIC_LIBNAME "readerlib_s")
# Set compiler options
set (CMAKE_C_STANDARD 11)
set (CMAKE_C_COMPILER "/usr/bin/clang")
set (CMAKE_C_FLAGS "-fPIC -Weverything -pthread")
set (CMAKE_C_FLAGS_DEBUG "-g")
set (CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set (CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG")
set (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_COMPILER "/usr/bin/clang++")
set (CMAKE_CXX_FLAGS "-fPIC -Weverything -Wno-unused-parameter -Wno-weak-vtables -Wno-c++98-compat -Wno-padded -Wno-covered-switch-default -Wno-vla -Wno-vla-extension -pthread")
set (CMAKE_CXX_FLAGS_DEBUG "-g -fsanitize=undefined -fsanitize=address -fsanitize=leak")
set (CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set (CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG")
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
set (CMAKE_SHARED_LINKER_FLAGS "-v -lboost_system")
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREAD ON)
find_package(Boost 1.65.0 REQUIRED COMPONENTS system filesystem regex)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTORCC ON)
add_subdirectory (src)
add_subdirectory (test)