Skip to content

Commit

Permalink
Fix code coverage build issue (#104)
Browse files Browse the repository at this point in the history
* Fix build isses when running code coverage

* Update CMakeLists to exclude pdb when running code coverage
  • Loading branch information
roopavr-adsk authored Mar 19, 2024
1 parent b4d88c6 commit 59b9563
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ install(TARGETS ${TARGET_NAME}
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/maya)

if(IS_WINDOWS)
install(FILES $<TARGET_PDB_FILE:${TARGET_NAME}>
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/maya OPTIONAL)
if (NOT CODE_COVERAGE)
install(FILES $<TARGET_PDB_FILE:${TARGET_NAME}>
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/maya OPTIONAL)
endif()
endif()

set(LIBFILENAME ${CMAKE_SHARED_LIBRARY_PREFIX}${TARGET_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
Expand Down
2 changes: 1 addition & 1 deletion lib/mayaHydra/mayaPlugin/renderOverride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ void MtohRenderOverride::ClearHydraResources(bool fullReset)
// Leak the Maya scene index, as its base class HdRetainedSceneIndex
// destructor crashes under Windows clang code coverage build.
_mayaHydraSceneIndex->RemoveCallbacksAndDeleteAdapters();
_mayaHydraSceneIndex.release();
_mayaHydraSceneIndex.Reset();
#else
_ClearMayaHydraSceneIndex();
#endif
Expand Down
1 change: 0 additions & 1 deletion lib/mayaHydra/mayaPlugin/renderOverride.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ class MtohRenderOverride : public MHWRender::MRenderOverride
[&panelName](const PanelCallbacks& item) { return item.first == panelName; });
}

MAYAHYDRALIB_API
void _PopulateSelectionList(
const HdxPickHitVector& hits,
const MHWRender::MSelectionInfo& selectInfo,
Expand Down

0 comments on commit 59b9563

Please sign in to comment.