-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
46 lines (38 loc) · 2.21 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
#=======================================================================================================================
# Preamble
#=======================================================================================================================
cmake_minimum_required(VERSION 3.03 FATAL_ERROR)
project (TablePrinter)
#=======================================================================================================================
# Set project metadata
#=======================================================================================================================
set(PROJECT_VENDOR "Kenneth Troldal Balslev")
set(PROJECT_CONTACT "[email protected]")
set(PROJECT_URL "https://github.com/troldal/TablePrinter")
set(PROJECT_DESCRIPTION "A header-only C++ library for printing tables in console applications")
#=======================================================================================================================
# Set C/C++ compiler version
#=======================================================================================================================
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
#=======================================================================================================================
# Add build options
#=======================================================================================================================
# NOTE: Algorithms is header-only, so without examples or the tests, there are not targets to be built.
option(CREATE_DOCS "Build library documentation (requires Doxygen and Graphviz/Dot to be installed)" ON)
option(BUILD_SAMPLES "Build sample programs" ON)
option(BUILD_TESTS "Build and run library tests" ON)
#=======================================================================================================================
# Add project subdirectories
#=======================================================================================================================
add_subdirectory(library)
if (${CREATE_DOCS})
add_subdirectory(doxy)
endif ()
if (${BUILD_TESTS})
#add_subdirectory(tests)
endif ()
if (${BUILD_SAMPLES})
add_subdirectory(examples)
endif ()