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)
5 cmake_minimum_required(VERSION 3.5)
8 cmake_policy(SET CMP0074 NEW)
11 project(CmakeConfigHeadersTest LANGUAGES CXX)
13 include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake)
18 set(BOOST_HINTS HINTS ../../../../stage)
21 find_package(Boost ${BOOST_VERSION} EXACT REQUIRED ${BOOST_HINTS})
23 # Using `include_directories` is bad practice, done here for
24 # testing purposes. The right, "modern CMake", thing to do is
25 # `target_link_libraries(main Boost::headers)`.
27 include_directories(${Boost_INCLUDE_DIRS})
29 add_executable(main quick.cpp)
32 add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)