mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
Sync from upstream.
This commit is contained in:
@@ -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")
|
||||
|
||||
27
extra/boost_interprocess.natvis
Normal file
27
extra/boost_interprocess.natvis
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2024 Braden Ganetsky.
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
-->
|
||||
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
|
||||
<Type Name="boost::interprocess::offset_ptr<*>" Inheritable="false">
|
||||
<!-- This is a simplified and inlined version of `offset_ptr::get()` -->
|
||||
<Intrinsic Name="get" Expression="(internal.m_offset == 1) ? (pointer)nullptr : (pointer)((unsigned char*)this + internal.m_offset)" />
|
||||
<Intrinsic Name="boost_to_address" ReturnType="pointer" Expression="get()" />
|
||||
|
||||
<!-- This is a simplified and inlined version of `offset_ptr::operator+=()` -->
|
||||
<Intrinsic Name="boost_next" ReturnType="pointer" Expression="reinterpret_cast<pointer>( reinterpret_cast<unsigned char*>(ptr) + static_cast<offset_type>(offset * (difference_type)sizeof(element_type)) )">
|
||||
<Parameter Name="ptr" Type="pointer" />
|
||||
<Parameter Name="offset" Type="difference_type" />
|
||||
</Intrinsic>
|
||||
|
||||
<DisplayString>{get()}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>get()</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
</AutoVisualizer>
|
||||
Reference in New Issue
Block a user