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 5# We support CMake 3.5, but prefer 3.16 policies and behavior 6cmake_minimum_required(VERSION 3.5...3.16) 7 8project(boost_assert VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) 9 10add_library(boost_assert INTERFACE) 11add_library(Boost::assert ALIAS boost_assert) 12 13target_include_directories(boost_assert INTERFACE include) 14 15target_link_libraries(boost_assert 16 INTERFACE 17 Boost::config 18) 19 20# boost_install requires PROJECT_VERSION 21# Without the superproject, we don't have any, so skip installation 22 23if(BOOST_SUPERPROJECT_VERSION) 24 25 include(BoostInstall) 26 boost_install(TARGETS boost_assert HEADER_DIRECTORY include/) 27 28endif() 29 30# BUILD_TESTING is the standard CTest variable that enables testing 31 32if(BUILD_TESTING) 33 34 add_subdirectory(test) 35 36endif() 37