-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
40 lines (31 loc) · 971 Bytes
/
CMakeLists.txt
File metadata and controls
40 lines (31 loc) · 971 Bytes
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
cmake_minimum_required(VERSION 3.10)
project(template)
include(CTest)
set(CMAKE_CXX_STANDARD 14)
# static checks
# if(MSVC)
# add_compile_options(/W4 /WX)
# else()
# add_compile_options(-Wall -Wextra -pedantic -Werror)
# endif()
# set(CMAKE_CXX_CLANG_TIDY
# clang-tidy;
# -checks=*;
# )
# set(CMAKE_CXX_CPPCHECK
# cppcheck;
# --error-exitcode=1;
# )
# define library called queue that can imported into other targets via
# 'target_link_libraries'
add_library(mymath src/duration.cpp)
target_include_directories(mymath PUBLIC include)
# define executable named main for experimenting and debugging code
add_executable(main src/main.cpp)
# target_compile_options(main PRIVATE -g)
target_link_libraries(main PUBLIC mymath)
# tests are added by declaring a target, in this case 'tests'. additional tests
# can be added by expanding the test cases in 'src/tests.cpp' or an additional
# target via 'add_executable'
enable_testing()
add_subdirectory(tests)