mirror of
https://github.com/boostorg/exception.git
synced 2025-07-30 04:27:18 +02:00
Regenerate CMakeLists.txt
This commit is contained in:
@ -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.
|
# 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 )
|
cmake_minimum_required(VERSION 3.5...3.20)
|
||||||
project( boost_exception VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX )
|
|
||||||
|
|
||||||
# We treat Boost.Exception as header only for now.
|
project(boost_exception VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||||
# See https://github.com/boostorg/exception/pull/17
|
|
||||||
# for more information.
|
|
||||||
|
|
||||||
add_library( boost_exception INTERFACE )
|
add_library(boost_exception
|
||||||
add_library( Boost::exception ALIAS boost_exception )
|
src/clone_current_exception_non_intrusive.cpp
|
||||||
|
|
||||||
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 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()
|
||||||
|
Reference in New Issue
Block a user