forked from boostorg/assert
38 lines
868 B
CMake
38 lines
868 B
CMake
# Copyright 2018 Mike Dev
|
|
# 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(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
|
|
INTERFACE
|
|
Boost::config
|
|
)
|
|
|
|
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|
|
|
add_subdirectory(../config bin/config)
|
|
add_subdirectory(../core bin/core)
|
|
|
|
include(../mincmake/cmake/boost_test.cmake)
|
|
|
|
enable_testing()
|
|
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
|
|
|
endif()
|
|
|
|
if(COMMAND boost_test)
|
|
|
|
add_subdirectory(test)
|
|
|
|
endif()
|