Compare commits

..

1 Commits

2 changed files with 14 additions and 8 deletions

View File

@@ -11,19 +11,13 @@ project(boost_static_assert VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CX
add_library(boost_static_assert INTERFACE)
add_library(Boost::static_assert ALIAS boost_static_assert)
target_include_directories(boost_static_assert INTERFACE include)
target_link_libraries(boost_static_assert
INTERFACE
Boost::config
)
# Automatic installation doesn't trigger because we have no include directory
if(BOOST_SUPERPROJECT_VERSION AND NOT CMAKE_VERSION VERSION_LESS 3.13)
boost_install(TARGETS boost_static_assert VERSION ${BOOST_SUPERPROJECT_VERSION})
endif()
# BUILD_TESTING is the standard CTest variable that enables testing
if(BUILD_TESTING)

View File

@@ -0,0 +1,12 @@
// Copyright 2025 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
//
// This header is unused and is only present for backward compatibility.
// Without it, StaticAssert would be the only library without an include/
// directory, and this breaks third-party installation scripts and logic.
// Introduce an artificial dependency on Config, such that libraries that
// link to StaticAssert depend on the new location of boost/static_assert.hpp
#include <boost/config.hpp>