generated from ucu-computer-science/cpp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
executable file
·35 lines (29 loc) · 1.23 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
cmake_minimum_required(VERSION 3.15)
project(mycat
VERSION 1.0.0
DESCRIPTION "Read files to stdout"
HOMEPAGE_URL "https://github.com/ucu-computer-systems/mycat-template"
LANGUAGES C CXX)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
# Options
option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors." ON)
option(ENABLE_CONAN "Use Conan as a package manager." OFF)
option(ENABLE_PVS_STUDIO "Use PVS-Studio static code analyzer." ON)
option(ENABLE_SANITIZERS "Use sanitizers to detect errors." OFF) # Option for the test builds. Do not use it in the production builds.
# Project source compilation
include_directories(inc)
add_library(cat STATIC
src/cat/cat.cpp inc/cat/cat.hpp)
add_executable(mycat src/main.cpp)
target_link_libraries(mycat cat)
add_executable(signal_bomber src/signal_bomber.cpp)
# Add external packages
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.71.0 COMPONENTS program_options REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
target_link_libraries(mycat Boost::program_options)
# Define ALL_TARGETS variable to use in some directives
set(ALL_TARGETS cat mycat signal_bomber)
# Include default CMake configuration
include(cmake/Config.cmake)