-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
40 lines (31 loc) · 1.1 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
# Copyright (c) 2019 Eleftherios Avramidis <[email protected]>
#
# Distributed under The MIT License (MIT)
# See accompanying file LICENSE.txt
#---------------------------------------------------------------------------//
cmake_minimum_required(VERSION 3.15)
project(Chronos
VERSION 1.0.0
DESCRIPTION "Walltime measurement library.")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN YES)
# Project settings
include(cmake/StandardProjectSettings.cmake)
add_library(chronos_project_options INTERFACE)
target_compile_features(chronos_project_options INTERFACE cxx_std_17)
# Standard compiler warnings
add_library(chronos_project_warnings INTERFACE)
include(cmake/CompilerWarnings.cmake)
set_project_warnings(chronos_project_warnings)
add_subdirectory(source)
include(GenerateExportHeader)
generate_export_header(Chronos)
option(CHRONOS_ENABLE_EXAMPLES "Enable examples" OFF)
option(CHRONOS_ENABLE_TESTS "Enable tests" OFF)
if (CHRONOS_ENABLE_EXAMPLES)
add_subdirectory(examples)
endif ()
if (CHRONOS_ENABLE_TESTS)
enable_testing()
add_subdirectory(tests)
endif ()