Regenerate CMakeLists.txt

This commit is contained in:
Peter Dimov
2021-06-10 04:34:05 +03:00
parent 5a5434e6e8
commit f93f374607

View File

@ -1,26 +1,44 @@
# Copyright 2019 Mike Dev
# Generated by `boostdep --cmake exception`
# Copyright 2020, 2021 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
# https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required( VERSION 3.5...3.20 )
project( boost_exception VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX )
cmake_minimum_required(VERSION 3.5...3.20)
# We treat Boost.Exception as header only for now.
# See https://github.com/boostorg/exception/pull/17
# for more information.
project(boost_exception VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library( boost_exception INTERFACE )
add_library( Boost::exception ALIAS boost_exception )
target_include_directories( boost_exception INTERFACE include )
target_link_libraries( boost_exception
INTERFACE
Boost::assert
Boost::config
Boost::core
Boost::smart_ptr
Boost::throw_exception
Boost::tuple
Boost::type_traits
add_library(boost_exception
src/clone_current_exception_non_intrusive.cpp
)
add_library(Boost::exception ALIAS boost_exception)
target_include_directories(boost_exception PUBLIC include)
target_link_libraries(boost_exception
PUBLIC
Boost::assert
Boost::config
Boost::core
Boost::smart_ptr
Boost::throw_exception
Boost::tuple
Boost::type_traits
)
target_compile_definitions(boost_exception
PUBLIC BOOST_EXCEPTION_NO_LIB
PRIVATE BOOST_EXCEPTION_SOURCE
)
if(BUILD_SHARED_LIBS)
target_compile_definitions(boost_exception PUBLIC BOOST_EXCEPTION_DYN_LINK)
else()
target_compile_definitions(boost_exception PUBLIC BOOST_EXCEPTION_STATIC_LINK)
endif()
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()