From e3590d89af6ebd99d8900d778921c96e40b3388f Mon Sep 17 00:00:00 2001 From: Mike Dev Date: Tue, 2 Oct 2018 21:33:32 +0200 Subject: [PATCH] [CMake] Add minimal cmake file Generate cmake target that builds the library and which can be used by other libraries to express their dependency on this library and retrieve any configuration information such as the include directory, binary to link to, transitive dependencies, necessary compiler options or the required c++ standards level. --- CMakeLists.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..29d8424 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright 2018 Mike Dev +# 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 +# +# NOTE: CMake support for Boost.Exception is currently experimental at best +# and the interface is likely to change in the future + +cmake_minimum_required(VERSION 3.5) +project(BoostException LANGUAGES CXX) + + +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 +) +