[vtk] Avoid removed stdext.#51869
Conversation
Alternative to microsoft#51794 Regenerated all patches and reverted those where only the "index" part changed. Removed blank newline delete from NoUndefDebug.patch.
| set(vtk_mfc_static 0) | ||
| else () | ||
| set(vtk_mfc_static 1) | ||
| diff --git a/GUISupport/MFC/CMakeLists.txt b/GUISupport/MFC/CMakeLists.txt |
There was a problem hiding this comment.
The main change is that this file was incorrectly CRLF.
| - | ||
| -find_library(CGNS_LIBRARY | ||
| - NAMES | ||
| @@ -16,7 +16,7 @@ mark_as_advanced(CGNS_INCLUDE_DIR) |
There was a problem hiding this comment.
When someone minted this patch they changed all the line endings in the file so the patch duplicated the whole file. I copied the "new" over the old with correct line endings and regenerated the patch.
| index 38765256..c0d9c3d6 100644 | ||
| --- a/IO/IOSS/vtkIOSSUtilities.cxx | ||
| +++ b/IO/IOSS/vtkIOSSUtilities.cxx | ||
| @@ -32,6 +32,7 @@ |
There was a problem hiding this comment.
This line number is different than the old one which is why I kept this but I wish it did not reorder the hunks :/
| - VERSION 0.7.0 | ||
| TARGETS JsonCpp::JsonCpp | ||
| STANDARD_INCLUDE_DIRS) | ||
| diff --git a/ThirdParty/jsoncpp/CMakeLists.txt b/ThirdParty/jsoncpp/CMakeLists.txt |
There was a problem hiding this comment.
Another broken CRLF patch being fixed to be LF
| CLASSES ${classes}) | ||
| vtk_module_link(VTK::AcceleratorsVTKmFilters | ||
| PRIVATE | ||
| - vtkm_worklet |
There was a problem hiding this comment.
I have no idea why before this was doing a patch on a patch inside the same patch, but the regeneration process merged this hunk into the one above
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the vtk vcpkg port to avoid reliance on stdext (removed in newer MSVC toolsets) and refreshes the port’s patch set accordingly.
Changes:
- Bump
vtkport-version to 16 and update baseline/versions entries. - Add a new patch to gate
stdext::checked_array_iteratorusage for older MSVC. - Regenerate/refresh multiple VTK patches (VTKm, PEGTL, IOSS/IOtr, etc.) to match updated upstream file contexts and dependency target expectations.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| versions/v-/vtk.json | Adds a new version entry for the port-version bump. |
| versions/baseline.json | Updates vtk baseline port-version to 16. |
| ports/vtk/vcpkg.json | Bumps vtk port-version to 16. |
| ports/vtk/portfile.cmake | Applies the new avoid-stdext patch during source acquisition. |
| ports/vtk/avoid-stdext.diff | New patch to avoid stdext usage on newer MSVC. |
| ports/vtk/pegtl.patch | Updates PEGTL integration (Find module + API adjustments). |
| ports/vtk/afxdll.patch | Changes MFC runtime decision to use vcpkg CRT linkage. |
| ports/vtk/vtkm.patch | Switches VTKm integration towards config-package + target usage. |
| ports/vtk/vtkioss.patch | Adds missing include and links additional IOSS target. |
| ports/vtk/pythonwrapper.patch | Adds interface include dirs to Python wrapper generation args. |
| ports/vtk/iotr.patch | Ensures Iotr_Factory.h is included where needed. |
| ports/vtk/cgns.patch | Extends CGNS library name search and adds HDF5 linkage. |
| ports/vtk/jsoncpp.patch | Removes an external version pin from JsonCpp third-party declaration. |
| ports/vtk/libproj.patch | Refreshes libproj patch offsets/contexts. |
| ports/vtk/opencascade-7.8.0.patch | Refreshes patch offsets/contexts. |
| ports/vtk/NoUndefDebug.patch | Adjusts patch context and removes a stray blank-line deletion. |
| ports/vtk/FindExpat.patch | Refreshes the patch offset/context for FindEXPAT changes. |
Comments suppressed due to low confidence (3)
ports/vtk/pegtl.patch:1
find_package(PEGTL CONFIG REQUIRED)will hard-fail when a config package is not available, making theelse()fallback code path unreachable. To preserve the intended fallback behavior, use a non-REQUIRED (and typically QUIET) config lookup first, then fall back to thefind_path/FindPackageHandleStandardArgslogic, and only error out if neither approach succeeds.
diff --git a/CMake/FindPEGTL.cmake b/CMake/FindPEGTL.cmake
ports/vtk/afxdll.patch:1
- This condition will evaluate true whenever
CMAKE_MSVC_RUNTIME_LIBRARYis unset, which can incorrectly forcevtk_mfc_staticto 0 even whenVCPKG_CRT_LINKAGEis static. In vcpkg toolchain scenarios whereCMAKE_MSVC_RUNTIME_LIBRARYis often not explicitly set, this risks selecting the wrong MFC mode; prefer basing the decision primarily onVCPKG_CRT_LINKAGE(or ensureCMAKE_MSVC_RUNTIME_LIBRARYis reliably set before this check).
diff --git a/GUISupport/MFC/CMakeLists.txt b/GUISupport/MFC/CMakeLists.txt
ports/vtk/cgns.patch:1
- This makes HDF5 a hard requirement whenever CGNS is found, which can break configurations where CGNS is built without HDF5. Additionally, the code only links when
HDF5::HDF5exists, but many setups provide different imported target names (or only variables) viaFindHDF5/HDF5 config, so the dependency may not be wired even after a successful find. Consider using a non-REQUIRED HDF5 lookup here and linking via whichever imported targets are actually provided (falling back toHDF5_LIBRARIES/include vars when no imported targets exist).
diff --git a/CMake/FindCGNS.cmake b/CMake/FindCGNS.cmake
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Alternative to #51794
Regenerated all patches and reverted those where only the "index" part changed.
Removed blank newline delete from NoUndefDebug.patch.