diff --git a/CMakeLists.txt b/CMakeLists.txt index d57c44e..55988b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,15 @@ target_link_libraries(boost_interprocess Boost::winapi ) +if(CMAKE_VERSION VERSION_GREATER 3.18 AND CMAKE_GENERATOR MATCHES "Visual Studio") + + file(GLOB_RECURSE boost_interprocess_IDEFILES CONFIGURE_DEPENDS include/*.hpp) + source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_interprocess_IDEFILES} PREFIX "Header Files") + list(APPEND boost_interprocess_IDEFILES extra/boost_interprocess.natvis) + target_sources(boost_interprocess PRIVATE ${boost_interprocess_IDEFILES}) + +endif() + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") target_link_libraries(boost_interprocess INTERFACE rt) elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") diff --git a/extra/boost_interprocess.natvis b/extra/boost_interprocess.natvis new file mode 100644 index 0000000..320cb2e --- /dev/null +++ b/extra/boost_interprocess.natvis @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + {get()} + + get() + + + +