2018-09-28 17:55:52 +03:00
|
|
|
# Copyright 2018 Peter Dimov
|
|
|
|
|
# Distributed under the Boost Software License, Version 1.0.
|
|
|
|
|
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
|
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
|
|
|
|
|
|
project(BoostMp11 VERSION 1.69.0 LANGUAGES CXX)
|
|
|
|
|
|
|
|
|
|
add_library(boost_mp11 INTERFACE)
|
|
|
|
|
add_library(Boost::mp11 ALIAS boost_mp11)
|
|
|
|
|
|
|
|
|
|
target_include_directories(boost_mp11 INTERFACE include)
|
2018-09-29 00:15:53 +03:00
|
|
|
target_compile_features(boost_mp11 INTERFACE cxx_alias_templates cxx_variadic_templates cxx_decltype)
|
2018-09-28 17:55:52 +03:00
|
|
|
|
|
|
|
|
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|
|
|
|
|
|
|
|
|
# requires CMake 3.11 so we just carry it around
|
|
|
|
|
include(cmake/FetchContent.cmake)
|
|
|
|
|
|
2018-09-30 16:05:45 +03:00
|
|
|
message("-- Fetching pdimov/mincmake")
|
|
|
|
|
FetchContent_Populate(pdimov_mincmake QUIET GIT_REPOSITORY https://github.com/pdimov/mincmake GIT_TAG master GIT_SHALLOW 1)
|
|
|
|
|
include(${pdimov_mincmake_SOURCE_DIR}/cmake/boost_test.cmake)
|
2018-09-28 17:55:52 +03:00
|
|
|
|
2018-09-30 16:05:45 +03:00
|
|
|
message("-- Fetching boostorg/assert")
|
|
|
|
|
FetchContent_Populate(boostorg_assert QUIET GIT_REPOSITORY https://github.com/boostorg/assert GIT_TAG develop GIT_SHALLOW 1)
|
|
|
|
|
add_subdirectory(${boostorg_assert_SOURCE_DIR} ${boostorg_assert_BINARY_DIR})
|
2018-09-28 17:55:52 +03:00
|
|
|
|
2018-09-30 16:05:45 +03:00
|
|
|
message("-- Fetching boostorg/config")
|
|
|
|
|
FetchContent_Populate(boostorg_config QUIET GIT_REPOSITORY https://github.com/boostorg/config GIT_TAG develop GIT_SHALLOW 1)
|
|
|
|
|
add_subdirectory(${boostorg_config_SOURCE_DIR} ${boostorg_config_BINARY_DIR})
|
2018-09-28 17:55:52 +03:00
|
|
|
|
2018-09-30 16:05:45 +03:00
|
|
|
message("-- Fetching boostorg/core")
|
|
|
|
|
FetchContent_Populate(boostorg_core QUIET GIT_REPOSITORY https://github.com/boostorg/core GIT_TAG develop GIT_SHALLOW 1)
|
|
|
|
|
add_subdirectory(${boostorg_core_SOURCE_DIR} ${boostorg_core_BINARY_DIR})
|
2018-09-28 17:55:52 +03:00
|
|
|
|
|
|
|
|
enable_testing()
|
|
|
|
|
|
|
|
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
|
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(COMMAND boost_test)
|
|
|
|
|
|
|
|
|
|
add_subdirectory(test)
|
|
|
|
|
|
|
|
|
|
endif()
|