]>
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 | ||
5 | cmake_minimum_required(VERSION 3.5...3.16) | |
6 | ||
7 | project(boost_atomic_install_test LANGUAGES CXX) | |
8 | ||
9 | find_package(boost_atomic REQUIRED) | |
10 | ||
11 | if(BOOST_RUNTIME_LINK STREQUAL "static") | |
12 | set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") | |
13 | endif() | |
14 | ||
15 | add_executable(main main.cpp) | |
16 | target_link_libraries(main Boost::atomic) | |
17 | ||
18 | enable_testing() | |
19 | add_test(NAME main COMMAND main) | |
20 | ||
21 | add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>) |