]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | # Copyright 2018, 2019 Peter Dimov |
2 | # Distributed under the Boost Software License, Version 1.0. | |
3 | # See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt | |
4 | ||
f67539c2 TL |
5 | cmake_minimum_required(VERSION 3.5...3.16) |
6 | ||
7 | project(boost_timer VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) | |
8 | ||
9 | add_library(boost_timer | |
10 | src/auto_timers_construction.cpp | |
11 | src/cpu_timer.cpp | |
12 | ) | |
13 | ||
14 | add_library(Boost::timer ALIAS boost_timer) | |
15 | ||
16 | target_include_directories(boost_timer PUBLIC include) | |
17 | ||
18 | target_compile_definitions(boost_timer | |
19 | PUBLIC | |
20 | BOOST_TIMER_NO_LIB | |
21 | ) | |
22 | ||
23 | if(BUILD_SHARED_LIBS) | |
24 | target_compile_definitions(boost_timer PUBLIC BOOST_TIMER_DYN_LINK) | |
25 | else() | |
26 | target_compile_definitions(boost_timer PUBLIC BOOST_TIMER_STATIC_LINK) | |
27 | endif() | |
28 | ||
29 | target_link_libraries(boost_timer | |
30 | PUBLIC | |
31 | Boost::config | |
32 | Boost::core | |
33 | Boost::system | |
34 | PRIVATE | |
35 | Boost::chrono | |
36 | Boost::io | |
37 | Boost::predef | |
38 | Boost::throw_exception | |
39 | ) | |
40 | ||
41 | if(BUILD_TESTING) | |
42 | ||
43 | add_subdirectory(test) | |
44 | ||
45 | endif() |