• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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://boost.org/LICENSE_1_0.txt)
4
5cmake_minimum_required(VERSION 3.5)
6
7project(CmakeConfigThreadTest LANGUAGES CXX)
8
9include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake)
10
11if(USE_BOOST_PACKAGE)
12
13  find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS thread)
14
15else()
16
17  find_package(boost_thread ${BOOST_VERSION} EXACT CONFIG REQUIRED)
18
19endif()
20
21add_executable(main quick.cpp)
22target_link_libraries(main Boost::thread)
23
24enable_testing()
25add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
26
27add_test(main main)
28