Skip to content

Commit f2e88ad

Browse files
committed
ENH: Add Visual Studio specific debug helpers to ITKCommon project
Copying these files to VS installation directory will no longer be required.
1 parent efe5933 commit f2e88ad

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

Modules/Core/Common/src/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,17 @@ elseif(MSVC)
244244
COMPILE_FLAGS
245245
-fp:precise
246246
)
247+
get_filename_component(
248+
ITK_Debugger_DIR
249+
"${CMAKE_CURRENT_LIST_DIR}/../../../../Utilities/Debugger"
250+
ABSOLUTE
251+
)
252+
253+
# ITK.natvis are nicer debug visualizers for Visual Studio
254+
list(APPEND ITKCommon_SRCS ${ITK_Debugger_DIR}/ITK.natvis)
255+
256+
# do not step into SmartPointer and Object::Register
257+
list(APPEND ITKCommon_SRCS ${ITK_Debugger_DIR}/ITK.natstepfilter)
247258
endif()
248259

249260
### generating libraries
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<StepFilter xmlns="https://schemas.microsoft.com/vstudio/debugger/natstepfilter/2010">
3+
<Function><Name>itk::SmartPointer.+</Name><Action>NoStepInto</Action></Function>
4+
<Function><Name>itk::Object::Register</Name><Action>NoStepInto</Action></Function>
5+
</StepFilter>

0 commit comments

Comments
 (0)