Skip to content

Commit 1069d7b

Browse files
committed
Add boost_assert.natvis as PUBLIC, to enable its installation
1 parent 448cd0b commit 1069d7b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018-2023 Peter Dimov
1+
# Copyright 2018-2025 Peter Dimov
22
# Distributed under the Boost Software License, Version 1.0.
33
# https://www.boost.org/LICENSE_1_0.txt
44

@@ -17,13 +17,18 @@ target_link_libraries(boost_assert
1717
Boost::config
1818
)
1919

20+
# Add headers and .natvis to project, for better IDE integration
21+
2022
if(CMAKE_VERSION VERSION_GREATER 3.18 AND CMAKE_GENERATOR MATCHES "Visual Studio")
2123

24+
# Using target_sources with PRIVATE or PUBLIC on INTERFACE targets requires 3.19
25+
2226
file(GLOB_RECURSE boost_assert_IDEFILES CONFIGURE_DEPENDS include/*.hpp)
2327
source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_assert_IDEFILES} PREFIX "Header Files")
24-
list(APPEND boost_assert_IDEFILES extra/boost_assert.natvis)
2528
target_sources(boost_assert PRIVATE ${boost_assert_IDEFILES})
2629

30+
target_sources(boost_assert PUBLIC extra/boost_assert.natvis)
31+
2732
endif()
2833

2934
# BUILD_TESTING is the standard CTest variable that enables testing

0 commit comments

Comments
 (0)