mirror of
https://github.com/boostorg/assert.git
synced 2026-01-25 08:32:25 +01:00
Add boost_assert.natvis as PUBLIC, to enable its installation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# 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
|
||||
|
||||
@@ -17,13 +17,18 @@ target_link_libraries(boost_assert
|
||||
Boost::config
|
||||
)
|
||||
|
||||
# Add headers and .natvis to project, for better IDE integration
|
||||
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.18 AND CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
|
||||
# Using target_sources with PRIVATE or PUBLIC on INTERFACE targets requires 3.19
|
||||
|
||||
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})
|
||||
|
||||
target_sources(boost_assert PUBLIC extra/boost_assert.natvis)
|
||||
|
||||
endif()
|
||||
|
||||
# BUILD_TESTING is the standard CTest variable that enables testing
|
||||
|
||||
Reference in New Issue
Block a user