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...3.16) 6 7project(cmake_subdir_test LANGUAGES CXX) 8 9add_subdirectory(../.. boostorg/endian) 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(config) 22boost_add_subdir(core) 23boost_add_subdir(static_assert) 24boost_add_subdir(type_traits) 25 26# secondary dependencies 27 28boost_add_subdir(assert) 29 30# --target check 31 32add_executable(quick ../quick.cpp) 33target_link_libraries(quick Boost::endian Boost::core) 34 35enable_testing() 36add_test(quick quick) 37 38add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>) 39