• 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://www.boost.org/LICENSE_1_0.txt
4
5cmake_minimum_required(VERSION 3.5)
6
7project(cmake_subdir_test LANGUAGES CXX)
8
9add_subdirectory(../.. boostorg/function)
10
11# boost_add_subdir
12
13function(boost_add_subdir name)
14
15    add_subdirectory(../../../${name} boostorg/${name})
16
17endfunction()
18
19# primary dependencies
20
21boost_add_subdir(assert)
22boost_add_subdir(bind)
23boost_add_subdir(config)
24boost_add_subdir(core)
25boost_add_subdir(integer)
26boost_add_subdir(preprocessor)
27boost_add_subdir(throw_exception)
28boost_add_subdir(type_index)
29boost_add_subdir(type_traits)
30boost_add_subdir(typeof)
31
32# secondary dependencies
33
34boost_add_subdir(static_assert)
35boost_add_subdir(container_hash)
36boost_add_subdir(smart_ptr)
37boost_add_subdir(detail)
38boost_add_subdir(move)
39boost_add_subdir(predef)
40
41# --target check
42
43add_executable(quick ../quick.cpp)
44target_link_libraries(quick Boost::function Boost::core)
45
46enable_testing()
47add_test(quick quick)
48
49add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
50