add boost_assert.natvis and interface target sources for VS

This commit is contained in:
Vinnie Falco
2022-08-19 10:30:19 -07:00
parent 7dea14cf7f
commit d363ac30da
2 changed files with 20 additions and 0 deletions

View File

@ -16,6 +16,12 @@ target_link_libraries(boost_assert
INTERFACE
Boost::config
)
file(GLOB_RECURSE boost_assert_IDEFILES CONFIGURE_DEPENDS include/*.hpp)
source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_assert_IDEFILES})
if (CMAKE_GENERATOR MATCHES "Visual Studio")
list(APPEND boost_assert_IDEFILES extra/boost_assert.natvis)
endif()
target_sources(boost_assert PRIVATE ${boost_assert_IDEFILES})
# BUILD_TESTING is the standard CTest variable that enables testing

14
extra/boost_assert.natvis Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="boost::source_location">
<DisplayString>{function_,sb} @ {file_,sb}:{line_}</DisplayString>
<Expand>
<Item Name="[file]">file_,sb</Item>
<Item Name="[line]">line_</Item>
<Item Name="[column]">column_</Item>
<Item Name="[function]">function_,sb</Item>
</Expand>
</Type>
</AutoVisualizer>