Update CMakeLists.txt

This commit is contained in:
Peter Dimov
2021-03-19 04:35:09 +02:00
parent bc16eee025
commit 78a03cb7bc

View File

@ -1,12 +1,11 @@
# Copyright 2019 Peter Dimov # Generated by `boostdep --cmake function`
# Copyright 2020 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 http://www.boost.org/LICENSE_1_0.txt # https://www.boost.org/LICENSE_1_0.txt
# Partial (add_subdirectory only) and experimental CMake support cmake_minimum_required(VERSION 3.5...3.16)
# Subject to change; please do not rely on the contents of this file yet
cmake_minimum_required(VERSION 3.5) project(boost_function VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
project(BoostFunction LANGUAGES CXX)
add_library(boost_function INTERFACE) add_library(boost_function INTERFACE)
add_library(Boost::function ALIAS boost_function) add_library(Boost::function ALIAS boost_function)
@ -26,3 +25,10 @@ target_link_libraries(boost_function
Boost::type_traits Boost::type_traits
Boost::typeof Boost::typeof
) )
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()