Add a Boost-friendly subproject case to CMakeLists

This commit is contained in:
Peter Dimov
2021-06-04 22:00:53 +03:00
parent d61e5ad30e
commit 777e0be5ec
+31
View File
@@ -1,3 +1,33 @@
if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
# Generated by `boostdep --cmake safe_numerics`
# Copyright 2020, 2021 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.8...3.20)
project(boost_safe_numerics VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_safe_numerics INTERFACE)
add_library(Boost::safe_numerics ALIAS boost_safe_numerics)
target_include_directories(boost_safe_numerics INTERFACE include)
target_link_libraries(boost_safe_numerics
INTERFACE
Boost::concept_check
Boost::config
Boost::core
Boost::integer
Boost::logic
Boost::mp11
)
target_compile_features(boost_safe_numerics INTERFACE cxx_std_14)
else()
# CMake build control file for safe numerics Library Examples
cmake_minimum_required(VERSION 3.8.6)
@@ -129,3 +159,4 @@ add_subdirectory("include/boost/safe_numerics")
add_subdirectory("example")
add_subdirectory("test")
endif()