Files
boost_assert/CMakeLists.txt
T

54 lines
1.4 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
2018-09-30 04:08:44 +03:00
# Partial (add_subdirectory only) and experimental CMake support
# Subject to change; please do not rely on the contents of this file yet
cmake_minimum_required(VERSION 3.5)
2018-09-20 00:55:16 +03:00
2019-04-13 04:21:27 +03:00
project(BoostAssert VERSION 1.71.0 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)
2018-10-09 05:57:41 +03:00
# `function` confuses FetchContent, sees empty CMAKE_CURRENT_LIST_DIR
macro(fetch_and_include name)
2018-09-20 00:55:16 +03:00
2018-10-09 05:57:41 +03:00
message(STATUS "Fetching ${name}")
2018-10-09 05:57:41 +03:00
file(DOWNLOAD
"https://raw.githubusercontent.com/pdimov/mincmake/master/${name}"
"${CMAKE_BINARY_DIR}/fetch_and_include/${name}"
)
2018-10-09 05:57:41 +03:00
include("${CMAKE_BINARY_DIR}/fetch_and_include/${name}")
endmacro()
fetch_and_include(cmake/boost_fetch.cmake)
fetch_and_include(cmake/boost_test.cmake)
boost_fetch(boostorg/config TAG develop)
boost_fetch(boostorg/core TAG develop)
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()