Files
boost_assert/CMakeLists.txt
T

47 lines
1.5 KiB
CMake
Raw Normal View History

2018-09-20 14:19:32 +03:00
# Copyright 2018 Mike Dev
2018-09-20 00:55:16 +03:00
# Copyright 2018 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
2018-09-20 01:53:36 +03:00
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
2018-09-20 00:55:16 +03:00
cmake_minimum_required(VERSION 3.5)
2018-09-20 00:55:16 +03:00
project(BoostAssert LANGUAGES CXX)
add_library(boost_assert INTERFACE)
add_library(Boost::assert ALIAS boost_assert)
target_include_directories(boost_assert INTERFACE include)
target_link_libraries(boost_assert
2018-09-19 21:12:28 +03:00
INTERFACE
Boost::config
)
2018-09-20 00:55:16 +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-20 00:55:16 +03:00
2018-09-28 20:14:36 +03:00
message("-- Populating boost_config")
FetchContent_Populate(boost_config QUIET GIT_REPOSITORY https://github.com/boostorg/config GIT_TAG develop)
add_subdirectory(${boost_config_SOURCE_DIR} ${boost_config_BINARY_DIR})
2018-09-28 20:14:36 +03:00
message("-- Populating boost_core")
FetchContent_Populate(boost_core QUIET GIT_REPOSITORY https://github.com/boostorg/core GIT_TAG develop)
add_subdirectory(${boost_core_SOURCE_DIR} ${boost_core_BINARY_DIR})
2018-09-28 20:14:36 +03:00
message("-- Populating mincmake")
FetchContent_Populate(mincmake QUIET GIT_REPOSITORY https://github.com/pdimov/mincmake GIT_TAG master)
include(${mincmake_SOURCE_DIR}/cmake/boost_test.cmake)
2018-09-20 17:47:40 +03:00
2018-09-20 00:55:16 +03:00
enable_testing()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
2018-09-20 00:55:16 +03:00
endif()
if(COMMAND boost_test)
2018-09-20 00:55:16 +03:00
add_subdirectory(test)
endif()