From 96992d16dd0b9b6ea919549bca93166c764333f6 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 18 Oct 2025 22:44:48 +0300 Subject: [PATCH] Add boost_assert.natvis as PUBLIC, to enable its installation; remove check for CMake 3.19 and Visual Studio --- CMakeLists.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cfd4f4..bac58c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,9 @@ -# Copyright 2018-2023 Peter Dimov +# Copyright 2018-2025 Peter Dimov # Distributed under the Boost Software License, Version 1.0. # https://www.boost.org/LICENSE_1_0.txt -# We support CMake 3.5, but prefer 3.20 policies and behavior -cmake_minimum_required(VERSION 3.5...3.20) +# We support CMake 3.8, but prefer 3.31 policies and behavior +cmake_minimum_required(VERSION 3.8...3.31) project(boost_assert VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) @@ -17,14 +17,14 @@ target_link_libraries(boost_assert Boost::config ) -if(CMAKE_VERSION VERSION_GREATER 3.18 AND CMAKE_GENERATOR MATCHES "Visual Studio") +# Add headers and .natvis to project, for better IDE integration - file(GLOB_RECURSE boost_assert_IDEFILES CONFIGURE_DEPENDS include/*.hpp) - source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_assert_IDEFILES} PREFIX "Header Files") - list(APPEND boost_assert_IDEFILES extra/boost_assert.natvis) - target_sources(boost_assert PRIVATE ${boost_assert_IDEFILES}) +file(GLOB_RECURSE boost_assert_HDRFILES CONFIGURE_DEPENDS include/*.hpp) +source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_assert_HDRFILES} PREFIX "Header Files") +target_sources(boost_assert PRIVATE ${boost_assert_HDRFILES}) +unset(boost_assert_HDRFILES) -endif() +target_sources(boost_assert PUBLIC extra/boost_assert.natvis) # BUILD_TESTING is the standard CTest variable that enables testing