File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -278,3 +278,43 @@ if(ITK_USE_TBB)
278278 # Define TBB_USE_CAPTURED_EXCEPTION=0 to request rethrow of the exact exception.
279279 target_compile_definitions (ITKCommon PUBLIC TBB_USE_CAPTURED_EXCEPTION=0 )
280280endif ()
281+
282+ if (MSVC )
283+ set (ITK_NATVIS_FILE "${ITK_SOURCE_DIR } /Utilities/Debugger/ITK.natvis" )
284+ if (CMAKE_GENERATOR MATCHES "Ninja" )
285+ # Ninja/Makefiles Generator support (embeds directly inside the executable's PDB)
286+ target_link_options (
287+ ITKCommon
288+ INTERFACE
289+ "$<BUILD_INTERFACE :/NATVIS :${ITK_NATVIS_FILE} >"
290+ "$<INSTALL_INTERFACE :/NATVIS :${ITK_INSTALL_DATA_DIR} /Debugger /ITK .natvis >"
291+ )
292+ # Force Ninja to re-link if the .natvis file changes
293+ set_property (
294+ TARGET
295+ ITKCommon
296+ APPEND
297+ PROPERTY
298+ LINK_DEPENDS
299+ "${ITK_NATVIS_FILE} "
300+ )
301+ else ()
302+ # Visual Studio Generator support (shows up in the Solution Explorer)
303+ target_sources (
304+ ITKCommon
305+ INTERFACE
306+ "$<BUILD_INTERFACE :${ITK_NATVIS_FILE} >"
307+ "$<BUILD_INTERFACE :${ITK_SOURCE_DIR } /Utilities /Debugger /ITK .natstepfilter >"
308+ "$<INSTALL_INTERFACE :${ITK_INSTALL_DATA_DIR} /Debugger /ITK .natvis >"
309+ "$<INSTALL_INTERFACE :${ITK_INSTALL_DATA_DIR} /Debugger /ITK .natstepfilter >"
310+ )
311+ endif ()
312+
313+ install (
314+ FILES
315+ "${ITK_NATVIS_FILE} "
316+ "${ITK_SOURCE_DIR } /Utilities/Debugger/ITK.natstepfilter"
317+ DESTINATION ${ITK_INSTALL_DATA_DIR} /Debugger
318+ COMPONENT Development
319+ )
320+ endif ()
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <!-- Documentation: https://learn.microsoft.com/en-us/visualstudio/debugger/just-my-code?view=visualstudio -->
3+ <StepFilter xmlns =" http://schemas.microsoft.com/vstudio/debugger/natstepfilter/2010" >
4+ <Function ><Name >itk::SmartPointer.*</Name ><Action >NoStepInto</Action ></Function >
5+ <Function ><Name >itk::Object::Register</Name ><Action >NoStepInto</Action ></Function >
6+ <Function ><Name >vtkSmartPointer.*</Name ><Action >NoStepInto</Action ></Function >
7+ <!-- We can also disable stepping into STL functions by uncommeting the next line: -->
8+ <!-- <Function><Name>std::.+</Name><Action>NoStepInto</Action></Function> -->
9+ </StepFilter >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <!-- Documentation: https://msdn.microsoft.com/en-us/library/jj620914.aspx?f=255&MSPPError=-2147217396 -->
3- <!-- e.g. copy into C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Packages\Debugger\Visualizers\ITK.natvis -->
2+ <!-- Documentation: https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/debugger/create-custom-views-of-native-objects?view=vs-2015 -->
43<AutoVisualizer xmlns =" http://schemas.microsoft.com/vstudio/debugger/natvis/2010" >
54
65 <Type Name =" itk::Size< 1> " >
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments