Skip to content

Vcpkg Windows and macOS Integration - #9800

Merged
pjones merged 20 commits into
OpenMS:developfrom
castorNova2:vcpkg_linux_integration
Aug 17, 2026
Merged

pjones merged 20 commits into
OpenMS:developfrom
castorNova2:vcpkg_linux_integration

Conversation

@castorNova2

@castorNova2 castorNova2 commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Extends the vcpkg intregation to Windows and macOS platforms. New additions are: respective platforms presets are added in CmakePresets.json file and also their compatibility code for integration, overlay ports of onnxruntime, openms-thermo-bridge and opentims, overlay triplets for macos, and different configuration triplets for linux.

Additions:

  • New configure, build and test presets for Windows and macos release, debug, relwithdebinfo and ci build.
  • Overlay ports of openms-thermo-bridge, onnxruntime and opentims with necessary patches and other things which are already handled by vcpkg.
  • onnxruntime vcpkg port already exists in upstream but is incompatible with clang which OpenMS uses. So a patch is added there locally.
  • isospec and eol-bspline overlay port which does not fetches upstream source code but instead mirrors what their vendored version already does.
  • glpk overlay port to fix glpk build error in newer clang/gcc (https://lists.gnu.org/archive/html/bug-glpk/2025-05/msg00000.html).
  • Overlay triplets are added for macOS because build with existing triplet gives SDK sysroot field in vcpkg build log empty, since Vcpkg wasn't passing passing -isysroot to port builds which was causing build failure. Setting it explicitly to macosx ensures that issue resolves.
  • Other overlay triplets are created to give users/consumers an option on how they build OpenMS using vcpkg. Since by default vcpkg builds both debug and release variant of every ports, I've added triplets which allows only release port build only, effectively halving the configure time by half (for e.g. below 2nd CI run of linux x64 gcc reduces the configure time from around 38 min to around 20 min)

Platform Coverage:

Note: The above runs belong to my fork's vcpkg-test-branch and its CI file. The Vcpkg CI file in this PR is a streamlined version of that since the vcpkg-test-branch CI file has multiple debugging and explicit steps.

Remaining Tasks:

  • Testing with Hdf5 on all platforms (vcpkg right now unable to fetch the upstream source code).

Checklist

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • Updated or added python bindings for changed or new classes (Tick if no updates were necessary.)

How can I get additional information on failed tests during CI

Click to expand If your PR is failing you can check out

Advanced commands (admins / reviewer only)

Click to expand
  • /reformat (experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.
  • setting the label "NoJenkins" will skip tests for this PR on jenkins (saves resources e.g., on edits that do not affect tests)
  • commenting with rebuild jenkins will retrigger Jenkins-based CI builds

⚠️ Note: Once you opened a PR try to minimize the number of pushes to it as every push will trigger CI (automated builds and test) and is rather heavy on our infrastructure (e.g., if several pushes per day are performed).

Summary by CodeRabbit

  • New Features

    • Added support for macOS ARM64 and Windows builds with newer toolchains.
    • Added packaged support for spline fitting, isotope analysis, ONNX Runtime, OpenTIMS, Thermo RAW access, and related libraries.
    • Added platform-specific build, test, and dependency configurations.
  • Bug Fixes

    • Improved compatibility with Clang, MSVC, CUDA, Windows memory mapping, and static SQLite builds.
    • Improved cross-platform dependency and package discovery.
  • Documentation

    • Added usage and build documentation for newly packaged libraries.

@castorNova2

castorNova2 commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor Author

@pjones Could you please check this PR?

@pjones pjones left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Only a few small changes to make.

Comment thread CMakeFiles/cmake.check_cache Resolved
@pjones

pjones commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Update: KISSFFT is no longer needed as a dependency by OpenMS.

@castorNova2
castorNova2 force-pushed the vcpkg_linux_integration branch from f83f10b to 00debb9 Compare August 2, 2026 08:35
@castorNova2

castorNova2 commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Update: Added overlay port of eol-bspline, isospec and glpk.

eol-bspline: overlay port mirrors the existing vendored eol-bspline integration located in src/openms/extern.
Isospec: overlay port mirrors the existing vendored isospec integration located in src/openms/extern.
glpk: overlay port does only one thing extra than upstream's glpk port i.e., Fixes glpk build failure on newer Clang/GCC by appending -std=gnu17 to CFLAGS (https://github.com/castorNova2/OpenMS/blob/vcpkg_linux_integration/vcpkg-overlays/ports/glpk/portfile.cmake#L47).
Upstream issue of glpk: (https://lists.gnu.org/archive/html/bug-glpk/2025-05/msg00000.html)

@jpfeuffer

Copy link
Copy Markdown
Contributor

The upstream issue suggests -ansi instead. Why not use this?
And glpk is disabled by default right? How do users choose their solver? Is there some vcpkg feature/option/configuration that one can do?

@castorNova2

castorNova2 commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor Author

The upstream issue suggests -ansi instead. Why not use this? And glpk is disabled by default right? How do users choose their solver? Is there some vcpkg feature/option/configuration that one can do?

The reason of not using -ansi flag because it would be too big of a jump backwards to resolve regression, used C17 instead since it is good middle ground for solving the issue and not sacrificing some features which may be not in ANSI C. (I also refactor it in my test-branch to ensure consistency with vcpkg glpk portfile existing code, later will add it in this PR after testing)

Yes glpk is disabled by default and in current vcpkg integration users need to pass two flags during configure step i.e., LP_SOLVER=GLPK and VCPKG_MANIFEST_FEATURES=lp-glpk. Former flag is for cmake itself to choose GLPK and latter flag is for vcpkg to install glpk.

Other two approaches I could think are:

  1. Adding conditional block in top-level CMakeLists.txt which automatically appends features after checking their cmake flags (https://learn.microsoft.com/en-us/vcpkg/users/buildsystems/cmake-integration#vcpkg_manifest_features).
    But in current state of top-level CMakeLists.txt we need to move all relevant existing option command before project command since vcpkg run at that time.

  2. Adding their dedicated presets in CMakePresets.json, out of all 3 approaches it abstracts the most(both flags are implicitly included, user only need to select their preset) but we need to add presets for all different configuration (for example, x64-linux preset for COIN, x64-linux-glpk for GLPK, x64-linux-highs for HIGHS), which make this json file balloon in number of codelines.

Current approach is the most manual but doesn't need to make changes to either CMakeLists.txt or CMakePresets.json. If user want to let say invoke two features(like glpk and onnxruntime) then they can add it like: cmake --preset <preset_name> -DVCPKG_MANIFEST_FEATURES="lp-glpk;onnxruntime" -DLP_SOLVER=GLPK -DWITH_ONNX=ON.

@jpfeuffer

Copy link
Copy Markdown
Contributor

OK sounds fine for now.

…cpkg's onnxruntime header erro, overlay port of pylmcf,wnet and wnetalign
@castorNova2
castorNova2 marked this pull request as ready for review August 12, 2026 07:47
@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 28bcddb4-043c-4b07-9692-3247ea1f4863

📥 Commits

Reviewing files that changed from the base of the PR and between ef8bc48 and c9b4b59.

📒 Files selected for processing (1)
  • CMakePresets.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • CMakePresets.json

📝 Walkthrough

Walkthrough

This PR expands vcpkg support across Linux, macOS ARM64, and Windows. It adds CI and CMake presets, updates dependency discovery, and adds overlay ports for IsoSpec, eol-bspline, GLPK, ONNX Runtime, OpenTIMS, Thermo Bridge, and related libraries.

Changes

Cross-platform CI and presets

Layer / File(s) Summary
Platform CI and build presets
.github/workflows/openms_vcpkg_ci.yml, CMakePresets.json, vcpkg-overlays/triplets/*
CI now covers macOS ARM64/Xcode and Windows/MSVC. Platform-specific dependency setup, compiler selection, triplets, configure presets, build presets, and test presets were added.

CMake dependency wiring

Layer / File(s) Summary
Dependency discovery and linkage
CMakeLists.txt, cmake/cmake_findExternalLibs.cmake, src/openms/CMakeLists.txt, src/openms/extern/*, src/tests/class_tests/openms/CMakeLists.txt
CMake now selects vcpkg or non-vcpkg ONNX Runtime packages. SQLite, WNetAlign, OpenTIMS, and ONNX include paths use discovered targets and fallbacks.

eol-bspline port and library

Layer / File(s) Summary
B-Spline library and packaging
vcpkg-overlays/ports/eol-bspline/*
The overlay adds the B-Spline API, banded matrix operations, spline solving and evaluation, CMake installation, vcpkg metadata, and documentation.

IsoSpec port and distribution engine

Layer / File(s) Summary
IsoSpec library and packaging
vcpkg-overlays/ports/isospec/*
The overlay adds isotope tables, formula and FASTA parsing, marginal traversal, generators, fixed envelopes, C and C++ APIs, numerical utilities, Windows memory mapping, and package installation.

Additional dependency ports

Layer / File(s) Summary
External dependency overlays
vcpkg-overlays/ports/glpk/*, vcpkg-overlays/ports/onnxruntime/*, vcpkg-overlays/ports/openms-thermo-bridge/*, vcpkg-overlays/ports/opentims/*, vcpkg-overlays/ports/wnet*/*, vcpkg-overlays/ports/pylmcf/*, vcpkg.json
New manifests, port files, patches, usage files, and feature declarations configure the additional dependencies and their platform-specific behavior.

Poem

A rabbit checks the build at night,
Mac and Windows compile right.
Splines curve and isotopes flow,
SQLite finds the paths to go.
Vcpkg ports line up in rows—
Hop, the cross-platform pipeline grows!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.85% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the PR's primary objective of extending vcpkg integration to Windows and macOS.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 19

Note

Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
vcpkg-overlays/ports/isospec/src/IsoSpec/IsoSpecConfig.cmake.in (1)

1-21: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the unused IsoSpecConfig.cmake.in template. src/CMakeLists.txt does not configure it. install(EXPORT IsoSpecTargets FILE IsoSpecConfig.cmake ...) generates the installed export file instead. The template contains unsubstituted placeholders and includes the nonexistent IsoSpecLibrary.cmake.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/IsoSpecConfig.cmake.in` around lines
1 - 21, Remove the unused IsoSpecConfig.cmake.in template; do not modify the
generated install(EXPORT IsoSpecTargets FILE IsoSpecConfig.cmake ...)
configuration in src/CMakeLists.txt.
🟡 Minor comments (7)
vcpkg-overlays/ports/openms-thermo-bridge/portfile.cmake-41-45 (1)

41-45: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Pin the license download to its expected SHA512.

file(DOWNLOAD) stops on transfer errors when STATUS is omitted, but it accepts changed content. Use vcpkg_download_distfile with SHA512 and pass its returned path to vcpkg_install_copyright.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/openms-thermo-bridge/portfile.cmake` around lines 41 -
45, Replace the file(DOWNLOAD) call in the openms-thermo-bridge port definition
with vcpkg_download_distfile, specifying the expected SHA512 and preserving the
pinned license URL; store its returned path and pass that path to
vcpkg_install_copyright instead of the hard-coded temporary file.
vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt-10-11 (1)

10-11: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Call cmake_minimum_required() before project().

CMake requires cmake_minimum_required() to run before the top-level project() call. In the current order CMake emits an author warning: cmake_minimum_required() should be called prior to this top-level project() call. The policy settings that cmake_minimum_required() establishes also do not apply to the project() call itself.

Two further points:

  • The project name is eol-bsplines, with a trailing s. The port, the package, and the target are all named eol-bspline. Align the project name to avoid confusion in build output and in ${PROJECT_NAME}-derived paths.
  • project() without LANGUAGES enables both C and CXX. This library contains only C++ sources. Enabling C makes vcpkg require a working C compiler for every triplet that builds this port.
🐛 Proposed fix
-project("eol-bsplines")
-cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
+project(eol-bspline LANGUAGES CXX)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt` around lines 10 - 11,
Update the top-level CMake declarations so cmake_minimum_required() appears
before project(), rename the project to eol-bspline, and restrict project() to
CXX only via its LANGUAGES setting.
vcpkg-overlays/ports/eol-bspline/portfile.cmake-1-5 (1)

1-5: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Declare the port as static-only.

vcpkg.json already declares both helper dependencies with "host": true. Because src/CMakeLists.txt always creates a STATIC target, add vcpkg_check_linkage(ONLY_STATIC_LIBRARY) to report and normalize dynamic-triplet requests. vcpkg_cmake_configure already performs an out-of-source build, so no source copy is required.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/eol-bspline/portfile.cmake` around lines 1 - 5, Update
the portfile setup before vcpkg_cmake_configure to call
vcpkg_check_linkage(ONLY_STATIC_LIBRARY), declaring the port static-only and
normalizing dynamic-triplet requests. Keep the existing out-of-source configure
flow and SOURCE_PATH unchanged.
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp-436-448 (1)

436-448: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve double precision in the double specialization.

Both sites narrow values that originate from double calculations to float. This reduces the precision of the smoothing matrix before LU factorization.

  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp#L436-L448: use double for b1, b2, and q.
  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp#L485-L493: use double for pm, pn, and sum.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp` around lines
436 - 448, Preserve double precision in the double-specialization calculations:
update b1, b2, and q in the Q matrix accumulation block at
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp lines 436-448 to
double, and update pm, pn, and sum at lines 485-493 to double. No other changes
are required.
vcpkg-overlays/ports/isospec/src/CMakeLists.txt-10-11 (1)

10-11: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Call cmake_minimum_required() before project().

CMake requires cmake_minimum_required() to run first. In the current order, CMake reports a warning and applies default policy settings during the project() call. Swap the two lines.

🔧 Proposed fix
-project("IsoSpec")
 cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
+project("IsoSpec" LANGUAGES CXX)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/isospec/src/CMakeLists.txt` around lines 10 - 11, Swap
the calls so cmake_minimum_required() executes before project("IsoSpec") in the
CMake configuration.
vcpkg-overlays/ports/isospec/src/IsoSpec/mman.cpp-156-167 (1)

156-167: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Map mprotect to _mprotect in mman.h. The header declares only _mprotect, so callers of the POSIX mprotect API cannot compile, while the implementation remains unused. Add #define mprotect _mprotect.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/mman.cpp` around lines 156 - 167,
Update mman.h to define the POSIX mprotect name as an alias of the existing
_mprotect implementation, ensuring callers resolve to _mprotect without changing
its behavior.
vcpkg-overlays/ports/isospec/src/IsoSpec/tabulator.cpp-1-8 (1)

1-8: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Add tabulator.cpp to the IsoSpec source list.

The current CMake source list omits this tracked file, so its explicit Tabulator instantiations are not compiled. The header already provides the required member and generator definitions.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/tabulator.cpp` around lines 1 - 8,
Add tabulator.cpp to the IsoSpec CMake source list so the explicit
Tabulator<IsoThresholdGenerator> and Tabulator<IsoLayeredGenerator>
instantiations in tabulator.cpp are compiled. Preserve the existing source-list
structure and entries.
🧹 Nitpick comments (16)
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h (1)

105-119: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Note the copy hazard on the raw BSplineP<T> *s member.

BSpline owns s through a raw pointer and deletes it in the destructor. The class declares no copy constructor and no copy assignment operator, and the base class BSplineBase declares a public copy constructor. A copy of a BSpline therefore shares s and causes a double free.

This is an upstream defect and not introduced by this PR. Do not patch the vendored source in place. If you want protection, add the fix as a port patch file so the change stays visible and revertable on the next upstream sync.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h` around lines 105 -
119, Add a separate vcpkg port patch for class BSpline to prevent unsafe copying
of its owning raw BSplineP<T>* s member, by explicitly disabling or correctly
implementing copy construction and copy assignment. Do not modify the vendored
BSpline.h directly; register the patch through the port configuration so it
remains visible and revertible.
vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h (3)

99-102: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

operator= has no self-assignment guard and frees memory it then reads.

operator= forwards to Copy(*this, b). For the expression m = m, a and b are the same object. Line 133 executes delete[] a.bands. Line 139 allocates a new array. Line 143 then reads b.bands[i], which points at the freed array. This is a use-after-free.

The copy constructor is safe, because it sets bands(0) before calling Copy.

This is an upstream defect and not introduced by this PR. OpenMS does not appear to self-assign a BandedMatrix, so the path is not reachable today. If you add a patch file for this port, include this guard.

🛡️ Proposed patch content
     BandedMatrix<T> & operator= (const BandedMatrix<T> &b) 
     {
+	if (this == &b)
+	    return *this;
 	return Copy (*this, b);
     }

Also applies to: 131-146

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h` around lines 99
- 102, Add a self-assignment check to BandedMatrix<T>::operator= before
forwarding to Copy, returning the current object unchanged when this and b refer
to the same instance; retain the existing Copy path for distinct objects.

359-371: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

The back substitution divides by A(M,M) without checking it for zero.

Line 360 executes b[M-1] /= A(M,M) unconditionally. The loop that follows checks A(i,i) == 0 at line 363 and returns 1. The last diagonal element receives no such check. If A(M,M) is zero, the result is an infinity or a NaN that propagates through the whole back substitution and into the spline coefficients, and LU_solve_banded still returns 0.

BSpline<T>::solve treats a return value of 0 as success and sets OK = true, so the caller cannot detect the failure.

LU_factor_banded rejects a zero pivot at line 299, which makes this unreachable for matrices produced by BSplineBase::factor. The gap only matters if a caller solves with a matrix that was not factored by that path.

This is an upstream defect and not introduced by this PR.

🛡️ Proposed patch content
     // Now for the backward substitution
+    if (A(M,M) == 0)
+	return 1;
     b[M-1] /= A(M,M);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h` around lines 359
- 371, Update the backward-substitution logic in LU_solve_banded to check A(M,M)
for zero before dividing b[M-1]; return the same failure status used by the
loop’s zero-diagonal check. Preserve the existing substitution flow for nonzero
pivots so callers such as BSpline<T>::solve can detect the failure through the
return value.

20-26: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Carry the vendored-source fixes as port patch files. The port copies eol-bspline 1.5 sources directly into vcpkg-overlays/ports/eol-bspline/src/, so every correction to upstream code is now an invisible edit to a copied tree. Four separate upstream defects need attention, and all four share this one root cause. Add a patches list to the portfile and keep each change as a discrete patch. The next upstream sync then shows exactly what OpenMS changed and why.

  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h#L20-L26: add #include <cassert> and #include <cstdlib>. Line 75 and line 92 call abs, and line 261 calls assert. Both resolve only through <iostream> today. Fix this one first, because it is the only defect in this group that can break the new Windows and macOS toolchains this PR targets.
  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h#L99-L102: add a if (this == &b) return *this; guard to operator=. Copy frees a.bands at line 133 and then reads b.bands[i] at line 143, which is a use-after-free when both refer to the same object.
  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h#L359-L371: check A(M,M) for zero before the division at line 360, and return 1 on zero. The loop below already performs this check for every other diagonal element.
  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h#L105-L119: delete or define the copy constructor and copy assignment operator. BSpline owns BSplineP<T> *s through a raw pointer and BSplineBase exposes a public copy constructor, so a copy causes a double free.

Only the first item is reachable in the current OpenMS call paths. Treat the other three as hardening.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h` around lines 20
- 26, Carry all four eol-bspline fixes as separate entries in a portfile patches
list rather than editing the vendored sources directly: in
vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h lines 20-26 add the
required cassert and cstdlib includes; at lines 99-102 update operator= with a
self-assignment guard; at lines 359-371 handle a zero A(M,M) diagonal by
returning 1 before division; and in
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h lines 105-119 delete or
properly define copying for the raw-pointer-owned BSpline state. Each file/site
requires its corresponding discrete patch, with the first include fix
prioritized and the remaining changes retained as hardening.
vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt (2)

36-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use POSITION_INDEPENDENT_CODE instead of a hardcoded -fPIC.

The if (NOT WIN32) guard covers MSVC, but it does not cover every non-GNU-style driver that CMake supports on Linux and macOS. CMake already knows the correct position-independent-code flag for each compiler and emits nothing where the flag does not apply.

This matters for this port. OpenMS links eol-bspline as a static archive into a shared library, so the objects must be position independent on ELF and Mach-O targets.

♻️ Proposed change
-# Apply compiler flags
-if (NOT WIN32)
-  target_compile_options(eol-bspline PRIVATE -fPIC)
-endif()
+# Objects are linked into a shared library, so they must be position independent.
+set_target_properties(eol-bspline PROPERTIES POSITION_INDEPENDENT_CODE ON)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt` around lines 36 - 38,
Replace the hardcoded -fPIC target_compile_options block with CMake’s
POSITION_INDEPENDENT_CODE property on the eol-bspline target, enabling it
unconditionally so CMake selects the appropriate compiler behavior across
supported platforms.

47-50: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Install the package version file.

The manifest declares version 2.2.0, but the port does not install eol-bsplineConfigVersion.cmake. Generate it with CMakePackageConfigHelpers and VERSION 2.2.0. If the export is renamed to eol-bsplineTargets.cmake, install a config wrapper that includes it. Keep the unnamespaced eol-bspline target required by OpenMS.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt` around lines 47 - 50,
Update the CMake install configuration around eol-bsplineTargets to use
CMakePackageConfigHelpers, generate and install eol-bsplineConfigVersion.cmake
with VERSION 2.2.0, and install a config wrapper that includes the exported
targets file if the export is renamed to eol-bsplineTargets.cmake. Preserve the
required unnamespaced eol-bspline target.
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.dox (1)

167-183: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

The installation section contradicts the port layout.

Line 182 states that all *.cpp and *.h files in BSpline/ must be copied into the include directory. The port does the opposite: src/CMakeLists.txt line 55 excludes *.cpp from the install and compiles the templates into a static library through BSplineLib.cpp.

The section also describes SCons and MS Studio project files, and the Tests/Data directory, the driver program, and the plot-N.png images referenced elsewhere in this file. None of those exist in this overlay.

This is upstream documentation carried over verbatim. Do not rewrite it. Add a short note at the top of the port directory, or in the port usage file, that states the packaged layout supersedes this section. That prevents a future maintainer from reading the *.cpp exclusion in CMakeLists.txt as a defect.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.dox` around lines 167 -
183, The port retains upstream installation documentation that conflicts with
the packaged layout. Add a brief maintainer-facing note at the top of the port
directory or in its usage documentation stating that the port’s CMake install
rules and packaged layout supersede the upstream Installation section, including
its references to copying .cpp files, SCons, MS Studio projects, tests, and plot
assets; do not modify the upstream BSpline.dox text.
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.cpp (1)

87-90: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

B and A are two names for the same vector.

Both references bind to s->A. The code accumulates the right-hand side through B, then solves in place through A. The aliasing is deliberate, but the two names hide it.

Do not change the vendored source. If you later maintain a patch for this port, a single name with a comment would make the in-place solve explicit.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.cpp` around lines 87 -
90, Leave the vendored BSpline source unchanged. If maintaining a future port
patch, replace the duplicate references in the surrounding solve logic with one
vector name and add a comment documenting that the right-hand-side accumulation
and in-place solve share s->A.
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp (1)

31-61: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Format both C++ sources to the repository standard.

The new sources use four-space indentation and omit braces for control-flow blocks.

  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp#L31-L61: use two-space indentation and braces for every block.
  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineLib.cpp#L22-L33: indent namespace contents by two spaces.

As per coding guidelines, C++ files require two-space indentation, aligned braces on separate lines, and braces for every block.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp` around lines 31
- 61, Format vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp lines
31-61 using two-space indentation, braces on separate aligned lines, and braces
around every control-flow block in Matrix::operator+=; also indent namespace
contents by two spaces in
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineLib.cpp lines 22-33.

Source: Coding guidelines

vcpkg-overlays/ports/isospec/src/CMakeLists.txt (1)

73-76: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Prefer the POSITION_INDEPENDENT_CODE property over a raw -fPIC flag.

The property is compiler independent and CMake applies the correct flag per toolchain. It also respects the vcpkg triplet setting.

♻️ Proposed refactor
-# Apply compiler flags
-if (NOT WIN32)
-  target_compile_options(IsoSpec PRIVATE -fPIC)
-endif()
+# Allow linking the static archive into shared libraries.
+set_target_properties(IsoSpec PROPERTIES POSITION_INDEPENDENT_CODE ON)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/isospec/src/CMakeLists.txt` around lines 73 - 76,
Replace the platform-specific raw -fPIC option in the IsoSpec target
configuration with CMake’s POSITION_INDEPENDENT_CODE target property. Apply it
to the IsoSpec target so the toolchain and vcpkg triplet control the appropriate
compiler behavior, and remove the surrounding WIN32 conditional.
vcpkg-overlays/ports/isospec/src/IsoSpec/cwrapper.cpp (1)

18-29: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Fetch a pinned upstream IsoSpec revision.

portfile.cmake builds from ${CURRENT_PORT_DIR}/src, and the 33 implementation files duplicate src/openms/extern/IsoSpec/IsoSpec byte-for-byte. The manifest declares 2.2.0, but upstream has no matching GitHub tag. Use vcpkg_from_github() with a real commit or release archive and its SHA, then patch the OpenMS CMake integration. If vendoring is required, document the exact upstream commit and local changes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/cwrapper.cpp` around lines 18 - 29,
Update the IsoSpec port source acquisition in portfile.cmake to use
vcpkg_from_github with a real pinned upstream commit or release archive and its
SHA256, instead of relying on the duplicated local src tree. Adjust the OpenMS
CMake integration to consume the fetched layout, and if local vendoring remains
necessary, document the exact upstream commit and all local modifications.
vcpkg-overlays/ports/isospec/src/IsoSpec/operators.h (1)

28-130: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Record the upstream IsoSpec version for these vendored sources. The overlay checks in verbatim upstream IsoSpec sources. These files use 4-space indentation and ){-style braces, which conflicts with the repository C++ guideline that requires 2-space indentation and braces on their own aligned lines. Do not reformat them. Reformatting vendored code makes every future upstream sync a manual merge. Instead, mark the directory as vendored and record the exact upstream commit or release tag it was copied from, so a later sync can diff against upstream.

Two options, in order of preference:

  1. Fetch a pinned upstream archive in portfile.cmake with vcpkg_from_github and apply local changes as patches. This removes the copied sources entirely.
  2. If the sources must stay in-tree, add the upstream commit or tag to vcpkg-overlays/ports/isospec/vcpkg.json or a README, and exclude the directory from repository formatting and lint checks.
  • vcpkg-overlays/ports/isospec/src/IsoSpec/operators.h#L28-L130: keep the upstream formatting; do not apply the 2-space rule. Note that the forward declaration at line 136 declares ::PrecalculatedMarginal at global scope, not IsoSpec::PrecalculatedMarginal. It is inert because OrderMarginalsBySizeDecresing is a template, so leave it unchanged and report it upstream.
  • vcpkg-overlays/ports/isospec/src/IsoSpec/allocator.h#L26-L66: keep the brace-less if at lines 54-55 as upstream wrote it; do not apply the always-brace rule to this vendored file.
  • vcpkg-overlays/ports/isospec/src/IsoSpec/dirtyAllocator.h#L25-L56: keep the upstream formatting; cover this file with the same vendored-directory exclusion.

As per coding guidelines, C++ files must "use C++23 and format C++ with 2-space indentation ... and braces on their own aligned lines; always use braces for blocks". The guidelines also state "Never modify vendored code under src/openms/extern/; use the provided synchronization scripts instead". These files sit under vcpkg-overlays/ rather than src/openms/extern/, so the never-modify rule does not apply by path. Confirm which rule the maintainers intend for vendored overlay sources.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/operators.h` around lines 28 - 130,
Record the exact upstream IsoSpec commit or release tag and treat these files as
vendored rather than reformatting them. Prefer replacing copied sources with a
pinned vcpkg_from_github archive and patches; otherwise document the version in
vcpkg.json or README and exclude vcpkg-overlays/ports/isospec/src/IsoSpec from
formatting and lint checks. In operators.h (lines 28-130), allocator.h (lines
26-66), and dirtyAllocator.h (lines 25-56), preserve upstream formatting,
including the brace-less if and global PrecalculatedMarginal declaration, and
report that declaration upstream; confirm with maintainers which
vendored-overlay rule applies.

Source: Coding guidelines

vcpkg-overlays/ports/isospec/src/IsoSpec/mman.h (1)

60-65: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Remove the unused _mprotect shim.
No source calls _mprotect or mprotect. Remove the declaration and definition instead of renaming the function.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/mman.h` around lines 60 - 65, Remove
the unused _mprotect declaration from mman.h and delete its corresponding
definition, without renaming it or adding a replacement mprotect shim; leave the
other memory-mapping APIs unchanged.
vcpkg-overlays/ports/isospec/src/IsoSpec/isoMath.h (1)

17-51: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Include platform.h in isoMath.h before evaluating ISOSPEC_BUILDING_OPENMS.

The CMake target currently defines ISOSPEC_BUILDING_OPENMS=true, so its sources use the 1024-entry table and bounds guard. Other translation units can still evaluate the macro before platform.h, select the 10M table, and omit the guard. This can cause an out-of-bounds access to g_lfact_table.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/isoMath.h` around lines 17 - 51,
Include platform.h at the top of isoMath.h before any evaluation of
ISOSPEC_BUILDING_OPENMS, ensuring all translation units select the same
factorial-table size and bounds-guard behavior.
vcpkg-overlays/ports/isospec/src/IsoSpec/platform.h (1)

31-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Restore the upstream default for direct header consumers. The installed IsoSpecExport.h path is correct, and IsoSpec is always static, so the compile and DLL-export concerns do not apply. The true default still applies OpenMS-specific factorial-table and size-check behavior to consumers that do not receive the target’s PUBLIC definition. Keep true in target_compile_definitions(IsoSpec PUBLIC ...) and restore false in platform.h.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/platform.h` around lines 31 - 33, In
platform.h, change the fallback definition of ISOSPEC_BUILDING_OPENMS from true
to false for direct header consumers. Leave the
target_compile_definitions(IsoSpec PUBLIC ...) definition unchanged at true.
vcpkg-overlays/ports/isospec/vcpkg.json (1)

1-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Declare all bundled licenses and install their notices.

Use an SPDX expression such as "BSD-2-Clause AND BSL-1.0 AND MIT AND LicenseRef-Public-Domain". Install the corresponding license notices in addition to IsoSpec/LICENSE.

The vendored snapshot has no version marker that supports 2.2.0.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/isospec/vcpkg.json` around lines 1 - 16, Update the
vcpkg port metadata for isospec to use the supported upstream version marker
rather than 2.2.0, declare the complete bundled-license SPDX expression covering
BSD-2-Clause, BSL-1.0, MIT, and LicenseRef-Public-Domain, and install notices
for each corresponding license in addition to IsoSpec/LICENSE.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CMakeLists.txt`:
- Around line 563-567: Update the ONNX Runtime dependency lookup in the
OPENMS_USE_VCPKG conditional so only the provider-specific find_package call in
the appropriate branch runs; remove any unconditional find_package(ONNXRuntime
REQUIRED) invocation while preserving the vcpkg onnxruntime CONFIG lookup.

In `@CMakePresets.json`:
- Line 116: Update the linux-arm64-ci preset to override WITH_THERMO_RAW to OFF,
preventing that preset from inheriting the global ON value; leave Thermo RAW
enabled only in platform presets that support its native dependencies.
- Line 110: In the CMake preset, replace the WITH_THERMORAWFILEPARSER_TEST
option with ENABLE_THERMO_RAW_TESTS and keep it enabled so CMakeLists.txt
fetches the Thermo RAW test data and ThermoRawFile_test runs its integration
path.

In `@src/openms/extern/CMakeLists.txt`:
- Around line 53-64: Remove the direct vendored changes from
src/openms/extern/CMakeLists.txt lines 53-64 and relocate the vcpkg SQLite
discovery and OPENMS_SQLITECPP_EXTRA_LIBS setup to maintained OpenMS CMake code.
For src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt lines 14-16, apply the
SQLite alias compatibility change through the SQLiteCpp synchronization source
or workflow instead of editing the vendored file.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.cpp`:
- Around line 117-134: Remove or replace the debug stream statements that output
vector objects in the solve flow around LU_solve_banded, including B and A. Keep
supported BandedMatrix<T> diagnostics such as base->Q, but ensure BSpline<float>
and BSpline<double> no longer require an operator<< for std::vector<T>.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp`:
- Around line 599-601: Validate the computed interval count before assigning it
to M in the constructor or initialization path containing DX: reject any
M/num_nodes value below 4, including the automatic waveLength == 0 and NX == 1
path, before matrix construction or calculateQ(). Update the public parameter
documentation to require at least 4 intervals and adjust tests to cover
rejection of explicit values 2–4 and the automatic insufficient-interval case.
- Around line 135-145: Implement a deep-copy assignment operator for
BSplineBase<T>, copying all scalar and container state and cloning the owned
base object while safely handling self-assignment, or explicitly delete copy
assignment if assignment is unsupported. Keep copy behavior consistent with the
existing BSplineBase copy constructor and ensure raw-pointer ownership cannot be
shallow-copied.
- Around line 165-173: Update setDomain() to reset OK before validating inputs,
ensuring every invalid call leaves the object marked not ready. During a valid
reconfiguration, clear or invalidate base->Nodes before rebuilding the
domain-dependent state so nodes() cannot expose values from the previous domain
and remains consistent when M changes.
- Around line 542-552: Update the x-domain validation in the min/max scan before
the later DX calculation: after determining xmin and xmax, reject the spline
when xmin is not strictly less than xmax. Ensure the rejection marks
construction as invalid and prevents Alpha(), Basis(), or DBasis() from being
used with a zero-width domain.

In `@vcpkg-overlays/ports/isospec/portfile.cmake`:
- Around line 1-12: Declare the IsoSpec port as static-only by adding
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) before vcpkg_cmake_configure() in the
port configuration flow, ensuring vcpkg records the required linkage before
configuring the build.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/fasta.h`:
- Around line 17-20: Add a port patch for the installed public header fasta.h so
it directly includes the standard headers declaring memset and size_t, rather
than relying on cwrapper.cpp include order. Keep the fix scoped to making
IsoSpec/fasta.h self-contained and visible as an upstream overlay change.
- Around line 37-42: Update the lookup index in the FASTA-processing loop to
convert fasta[idx] to unsigned char before multiplying by 6 and indexing
aa_symbol_to_elem_counts. Preserve the existing atomCounts accumulation
behavior, and report the same fix upstream so this overlay patch can later be
removed.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/fixedEnvelopes.cpp`:
- Around line 172-183: Replace the `_confs` reordering loop in `sort_by_mass()`
with the same cycle-following permutation logic used by `reorder_array`. Copy
`inverse` privately, then walk each permutation cycle while applying the
corresponding row swaps to `_confs`; update the private permutation state so
every cycle terminates, while leaving the original `inverse` results unchanged.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/misc.cpp`:
- Line 28: Update the quickselect declarations in both mirrored misc.h files to
use void** array, matching the existing quickselect definition in misc.cpp. Keep
the function name and remaining parameters unchanged so the declaration and
definition refer to the same overload.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/tabulator.h`:
- Around line 34-38: Update reallocate() and its callers to use size_t for
allocation byte counts, and preserve the original pointer when realloc fails by
assigning the result only after success. Widen allDimSizeOfInt and confs_tbl_idx
to size_t so the growth path and indexing calculations cannot overflow; apply
these changes consistently at the allocation and write sites.

In `@vcpkg-overlays/ports/onnxruntime/fix-clang-waitpkg-builtin.patch`:
- Around line 1-34: Align the patch filename used by the onnxruntime port
definition with the actual patch file: update the PATCHES entry in the port
configuration to reference fix-clang-waitpkg-builtin.patch, or rename the file
to match the existing entry, ensuring both names are identical.

In `@vcpkg-overlays/ports/onnxruntime/portfile.cmake`:
- Around line 15-20: Update the PATCHES list in the ONNX Runtime portfile to
reference the existing fix-clang-waitpkg-builtin.patch filename instead of
fix-clang-waitpkg-and-tpause-builtin.patch, preserving the remaining patch
entries unchanged.

In `@vcpkg-overlays/ports/opentims/fix-static-sqlite-include.patch`:
- Around line 9-14: The static OpenTIMS target currently exposes SQLite headers
without propagating its link dependency. In
vcpkg-overlays/ports/opentims/fix-static-sqlite-include.patch lines 9-14, update
opentims_cpp to link SQLite::SQLite3 through its interface for static consumers
and ensure the installed package configuration finds SQLite3; in
vcpkg-overlays/ports/opentims/usage lines 3-4, document the required SQLite
package and link target for static triplets until transitive export is
available.

In `@vcpkg.json`:
- Line 59: Update the OpenSSL entry in the vcpkg.json overrides to a patched 3.0
release at or above 3.0.21 after verifying compatibility, or remove the override
so the registry resolves a supported version.

---

Outside diff comments:
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/IsoSpecConfig.cmake.in`:
- Around line 1-21: Remove the unused IsoSpecConfig.cmake.in template; do not
modify the generated install(EXPORT IsoSpecTargets FILE IsoSpecConfig.cmake ...)
configuration in src/CMakeLists.txt.

---

Minor comments:
In `@vcpkg-overlays/ports/eol-bspline/portfile.cmake`:
- Around line 1-5: Update the portfile setup before vcpkg_cmake_configure to
call vcpkg_check_linkage(ONLY_STATIC_LIBRARY), declaring the port static-only
and normalizing dynamic-triplet requests. Keep the existing out-of-source
configure flow and SOURCE_PATH unchanged.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp`:
- Around line 436-448: Preserve double precision in the double-specialization
calculations: update b1, b2, and q in the Q matrix accumulation block at
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp lines 436-448 to
double, and update pm, pn, and sum at lines 485-493 to double. No other changes
are required.

In `@vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt`:
- Around line 10-11: Update the top-level CMake declarations so
cmake_minimum_required() appears before project(), rename the project to
eol-bspline, and restrict project() to CXX only via its LANGUAGES setting.

In `@vcpkg-overlays/ports/isospec/src/CMakeLists.txt`:
- Around line 10-11: Swap the calls so cmake_minimum_required() executes before
project("IsoSpec") in the CMake configuration.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/mman.cpp`:
- Around line 156-167: Update mman.h to define the POSIX mprotect name as an
alias of the existing _mprotect implementation, ensuring callers resolve to
_mprotect without changing its behavior.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/tabulator.cpp`:
- Around line 1-8: Add tabulator.cpp to the IsoSpec CMake source list so the
explicit Tabulator<IsoThresholdGenerator> and Tabulator<IsoLayeredGenerator>
instantiations in tabulator.cpp are compiled. Preserve the existing source-list
structure and entries.

In `@vcpkg-overlays/ports/openms-thermo-bridge/portfile.cmake`:
- Around line 41-45: Replace the file(DOWNLOAD) call in the openms-thermo-bridge
port definition with vcpkg_download_distfile, specifying the expected SHA512 and
preserving the pinned license URL; store its returned path and pass that path to
vcpkg_install_copyright instead of the hard-coded temporary file.

---

Nitpick comments:
In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h`:
- Around line 99-102: Add a self-assignment check to BandedMatrix<T>::operator=
before forwarding to Copy, returning the current object unchanged when this and
b refer to the same instance; retain the existing Copy path for distinct
objects.
- Around line 359-371: Update the backward-substitution logic in LU_solve_banded
to check A(M,M) for zero before dividing b[M-1]; return the same failure status
used by the loop’s zero-diagonal check. Preserve the existing substitution flow
for nonzero pivots so callers such as BSpline<T>::solve can detect the failure
through the return value.
- Around line 20-26: Carry all four eol-bspline fixes as separate entries in a
portfile patches list rather than editing the vendored sources directly: in
vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h lines 20-26 add the
required cassert and cstdlib includes; at lines 99-102 update operator= with a
self-assignment guard; at lines 359-371 handle a zero A(M,M) diagonal by
returning 1 before division; and in
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h lines 105-119 delete or
properly define copying for the raw-pointer-owned BSpline state. Each file/site
requires its corresponding discrete patch, with the first include fix
prioritized and the remaining changes retained as hardening.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.cpp`:
- Around line 87-90: Leave the vendored BSpline source unchanged. If maintaining
a future port patch, replace the duplicate references in the surrounding solve
logic with one vector name and add a comment documenting that the
right-hand-side accumulation and in-place solve share s->A.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.dox`:
- Around line 167-183: The port retains upstream installation documentation that
conflicts with the packaged layout. Add a brief maintainer-facing note at the
top of the port directory or in its usage documentation stating that the port’s
CMake install rules and packaged layout supersede the upstream Installation
section, including its references to copying .cpp files, SCons, MS Studio
projects, tests, and plot assets; do not modify the upstream BSpline.dox text.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h`:
- Around line 105-119: Add a separate vcpkg port patch for class BSpline to
prevent unsafe copying of its owning raw BSplineP<T>* s member, by explicitly
disabling or correctly implementing copy construction and copy assignment. Do
not modify the vendored BSpline.h directly; register the patch through the port
configuration so it remains visible and revertible.

In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp`:
- Around line 31-61: Format
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp lines 31-61 using
two-space indentation, braces on separate aligned lines, and braces around every
control-flow block in Matrix::operator+=; also indent namespace contents by two
spaces in vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineLib.cpp lines
22-33.

In `@vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt`:
- Around line 36-38: Replace the hardcoded -fPIC target_compile_options block
with CMake’s POSITION_INDEPENDENT_CODE property on the eol-bspline target,
enabling it unconditionally so CMake selects the appropriate compiler behavior
across supported platforms.
- Around line 47-50: Update the CMake install configuration around
eol-bsplineTargets to use CMakePackageConfigHelpers, generate and install
eol-bsplineConfigVersion.cmake with VERSION 2.2.0, and install a config wrapper
that includes the exported targets file if the export is renamed to
eol-bsplineTargets.cmake. Preserve the required unnamespaced eol-bspline target.

In `@vcpkg-overlays/ports/isospec/src/CMakeLists.txt`:
- Around line 73-76: Replace the platform-specific raw -fPIC option in the
IsoSpec target configuration with CMake’s POSITION_INDEPENDENT_CODE target
property. Apply it to the IsoSpec target so the toolchain and vcpkg triplet
control the appropriate compiler behavior, and remove the surrounding WIN32
conditional.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/cwrapper.cpp`:
- Around line 18-29: Update the IsoSpec port source acquisition in
portfile.cmake to use vcpkg_from_github with a real pinned upstream commit or
release archive and its SHA256, instead of relying on the duplicated local src
tree. Adjust the OpenMS CMake integration to consume the fetched layout, and if
local vendoring remains necessary, document the exact upstream commit and all
local modifications.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/isoMath.h`:
- Around line 17-51: Include platform.h at the top of isoMath.h before any
evaluation of ISOSPEC_BUILDING_OPENMS, ensuring all translation units select the
same factorial-table size and bounds-guard behavior.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/mman.h`:
- Around line 60-65: Remove the unused _mprotect declaration from mman.h and
delete its corresponding definition, without renaming it or adding a replacement
mprotect shim; leave the other memory-mapping APIs unchanged.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/operators.h`:
- Around line 28-130: Record the exact upstream IsoSpec commit or release tag
and treat these files as vendored rather than reformatting them. Prefer
replacing copied sources with a pinned vcpkg_from_github archive and patches;
otherwise document the version in vcpkg.json or README and exclude
vcpkg-overlays/ports/isospec/src/IsoSpec from formatting and lint checks. In
operators.h (lines 28-130), allocator.h (lines 26-66), and dirtyAllocator.h
(lines 25-56), preserve upstream formatting, including the brace-less if and
global PrecalculatedMarginal declaration, and report that declaration upstream;
confirm with maintainers which vendored-overlay rule applies.

In `@vcpkg-overlays/ports/isospec/src/IsoSpec/platform.h`:
- Around line 31-33: In platform.h, change the fallback definition of
ISOSPEC_BUILDING_OPENMS from true to false for direct header consumers. Leave
the target_compile_definitions(IsoSpec PUBLIC ...) definition unchanged at true.

In `@vcpkg-overlays/ports/isospec/vcpkg.json`:
- Around line 1-16: Update the vcpkg port metadata for isospec to use the
supported upstream version marker rather than 2.2.0, declare the complete
bundled-license SPDX expression covering BSD-2-Clause, BSL-1.0, MIT, and
LicenseRef-Public-Domain, and install notices for each corresponding license in
addition to IsoSpec/LICENSE.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 04ee8220-c5e6-449c-a1a8-fb71a060aa75

📥 Commits

Reviewing files that changed from the base of the PR and between 552802a and 30fa2d6.

📒 Files selected for processing (91)
  • .github/workflows/openms_vcpkg_ci.yml
  • CMakeLists.txt
  • CMakePresets.json
  • cmake/cmake_findExternalLibs.cmake
  • src/openms/CMakeLists.txt
  • src/openms/extern/CMakeLists.txt
  • src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt
  • src/tests/class_tests/openms/CMakeLists.txt
  • vcpkg-overlays/ports/eol-bspline/portfile.cmake
  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.cpp
  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.dox
  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h
  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp
  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.h
  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineLib.cpp
  • vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h
  • vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt
  • vcpkg-overlays/ports/eol-bspline/src/COPYRIGHT
  • vcpkg-overlays/ports/eol-bspline/src/DOCUMENTATION
  • vcpkg-overlays/ports/eol-bspline/src/Doxyfile
  • vcpkg-overlays/ports/eol-bspline/src/LICENSE
  • vcpkg-overlays/ports/eol-bspline/src/README
  • vcpkg-overlays/ports/eol-bspline/vcpkg.json
  • vcpkg-overlays/ports/glpk/configure.ac.patch
  • vcpkg-overlays/ports/glpk/glpk.pc.in
  • vcpkg-overlays/ports/glpk/portfile.cmake
  • vcpkg-overlays/ports/glpk/vcpkg.json
  • vcpkg-overlays/ports/isospec/portfile.cmake
  • vcpkg-overlays/ports/isospec/src/CMakeLists.txt
  • vcpkg-overlays/ports/isospec/src/IsoSpec/IsoSpecConfig.cmake.in
  • vcpkg-overlays/ports/isospec/src/IsoSpec/LICENSE
  • vcpkg-overlays/ports/isospec/src/IsoSpec/allocator.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/allocator.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/btrd.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/conf.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/cwrapper.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/cwrapper.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/dirtyAllocator.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/dirtyAllocator.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/element_tables.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/element_tables.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/fasta.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/fasta.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/fixedEnvelopes.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/fixedEnvelopes.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/isoMath.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/isoMath.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/isoSpec++.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/isoSpec++.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/marginalTrek++.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/marginalTrek++.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/misc.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/misc.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/mman.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/mman.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/operators.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/operators.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/platform.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/summator.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/tabulator.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/tabulator.h
  • vcpkg-overlays/ports/isospec/src/IsoSpec/test.cpp
  • vcpkg-overlays/ports/isospec/src/IsoSpec/unity-build.cpp
  • vcpkg-overlays/ports/isospec/vcpkg.json
  • vcpkg-overlays/ports/onnxruntime/fix-clang-waitpkg-builtin.patch
  • vcpkg-overlays/ports/onnxruntime/fix-cmake-cuda.patch
  • vcpkg-overlays/ports/onnxruntime/fix-cmake-mlas.patch
  • vcpkg-overlays/ports/onnxruntime/fix-cmake.patch
  • vcpkg-overlays/ports/onnxruntime/fix-missing-cstdint.patch
  • vcpkg-overlays/ports/onnxruntime/portfile.cmake
  • vcpkg-overlays/ports/onnxruntime/vcpkg.json
  • vcpkg-overlays/ports/openms-thermo-bridge/portfile.cmake
  • vcpkg-overlays/ports/openms-thermo-bridge/usage
  • vcpkg-overlays/ports/openms-thermo-bridge/vcpkg-nethost-use.patch
  • vcpkg-overlays/ports/openms-thermo-bridge/vcpkg.json
  • vcpkg-overlays/ports/opentims/fix-static-sqlite-include.patch
  • vcpkg-overlays/ports/opentims/portfile.cmake
  • vcpkg-overlays/ports/opentims/usage
  • vcpkg-overlays/ports/opentims/vcpkg.json
  • vcpkg-overlays/ports/pylmcf/portfile.cmake
  • vcpkg-overlays/ports/pylmcf/vcpkg.json
  • vcpkg-overlays/ports/wnet/portfile.cmake
  • vcpkg-overlays/ports/wnet/vcpkg.json
  • vcpkg-overlays/ports/wnetalign/portfile.cmake
  • vcpkg-overlays/ports/wnetalign/vcpkg.json
  • vcpkg-overlays/triplets/arm64-linux-dynamic-vcrel.cmake
  • vcpkg-overlays/triplets/arm64-osx-dynamic-sysroot-debug.cmake
  • vcpkg-overlays/triplets/arm64-osx-dynamic-sysroot-vcrel.cmake
  • vcpkg-overlays/triplets/arm64-osx-dynamic-sysroot.cmake
  • vcpkg-overlays/triplets/x64-linux-dynamic-vcrel.cmake
  • vcpkg.json

Comment thread CMakeLists.txt Resolved
Comment thread CMakePresets.json Resolved
Comment thread CMakePresets.json Resolved
Comment on lines +53 to +64
#Declaring vcpkg's sqlite3 up front so consumers can prefer it, instead of relying on race condition.
if(OPENMS_USE_VCPKG)
find_package(unofficial-sqlite3 CONFIG QUIET GLOBAL)
endif()

#Needed when linking SQLiteCpp directly, its own sqlite3 dependency isn't always reliably propogated
#weak linkage on macOS and Linux.
set(OPENMS_SQLITECPP_EXTRA_LIBS "")
if(OPENMS_USE_VCPKG AND TARGET unofficial::sqlite3::sqlite3)
list(APPEND OPENMS_SQLITECPP_EXTRA_LIBS unofficial::sqlite3::sqlite3)
endif()
set(OPENMS_SQLITECPP_EXTRA_LIBS "${OPENMS_SQLITECPP_EXTRA_LIBS}" CACHE INTERNAL "")

@coderabbitai coderabbitai Bot Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Do not modify vendored files under src/openms/extern/.

Move this integration logic to maintained OpenMS CMake code, or apply it through the repository synchronization workflow. Direct edits can be overwritten when the vendored dependencies are synchronized.

  • src/openms/extern/CMakeLists.txt#L53-L64: move vcpkg SQLite target discovery and OPENMS_SQLITECPP_EXTRA_LIBS setup outside the vendored directory.
  • src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt#L14-L16: apply the SQLite alias compatibility change through the SQLiteCpp synchronization source instead of this vendored file.

As per coding guidelines, “Never modify vendored code under src/openms/extern/; use the provided synchronization scripts instead.”

📍 Affects 2 files
  • src/openms/extern/CMakeLists.txt#L53-L64 (this comment)
  • src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt#L14-L16
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/openms/extern/CMakeLists.txt` around lines 53 - 64, Remove the direct
vendored changes from src/openms/extern/CMakeLists.txt lines 53-64 and relocate
the vcpkg SQLite discovery and OPENMS_SQLITECPP_EXTRA_LIBS setup to maintained
OpenMS CMake code. For src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt lines
14-16, apply the SQLite alias compatibility change through the SQLiteCpp
synchronization source or workflow instead of editing the vendored file.

Source: Coding guidelines

@castorNova2 castorNova2 Aug 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find a documented policy against editing src/openms/extern directly, no mention in contributing.md. There seems to be a sync script called sync-from-upstream.sh in src/openms/thirdparty/percolator directory. But checking the commit history of files under extern it seems they are historically directly edited(correct me if I am wrong). Happy to move forward with sync mechanism if it exists.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== Repository instruction and contributor documentation =='
fd -HI '^(AGENTS\.md|CONTRIBUTING(\.md)?|README(\.md)?)$' . \
  -E .git -E build -E OpenMS-build \
  -x sh -c 'echo "--- $1"; rg -ni -C2 "vendored|vendor|extern|sync-from-upstream|synchroni[sz]" "$1" || true' sh {}

echo
echo '== Synchronization scripts and references =='
fd -HI -t f 'sync-from-upstream\.sh|sync.*upstream|.*sync.*\.sh' . \
  -E .git -E build -E OpenMS-build \
  -x sh -c 'echo "--- $1"; sed -n "1,180p" "$1"' sh {} || true
rg -ni -C2 'sync-from-upstream|synchroni[sz].*(extern|SQLiteCpp)|SQLiteCpp.*synchroni[sz]' \
  -g '!**/.git/**' -g '!**/build/**' -g '!**/OpenMS-build/**' .

echo
echo '== Commit history: affected files =='
git log --format='%h %ad %an %s' --date=short -n 30 -- src/openms/extern/CMakeLists.txt
echo '-- SQLiteCpp sqlite3 CMake --'
git log --format='%h %ad %an %s' --date=short -n 30 -- src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt

echo
echo '== Recent changed line provenance =='
git blame -L 53,64 -- src/openms/extern/CMakeLists.txt || true
git blame -L 14,16 -- src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt || true

Length of output: 22221


@castorNova2, you are correct on both points.

CONTRIBUTING.md does not document this restriction. Direct edits also exist in the history of both affected files. For example, commits a9f803be4 and 9f916c2ae changed src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt.

The restriction is in the repository-root AGENTS.md. It explicitly prohibits modifications under src/openms/extern/ and src/openms/thirdparty/.

I found only one synchronization workflow: src/openms/thirdparty/percolator/sync-from-upstream.sh. I found no SQLiteCpp synchronization script or documented SQLiteCpp synchronization workflow. Therefore, my original comment was too specific when it required use of an existing SQLiteCpp synchronization workflow.

The vcpkg-specific discovery and linkage setup should move to maintained OpenMS CMake code outside src/openms/extern/. For the SQLiteCpp alias change, this PR needs either an existing supported upstream-sync process or maintainer guidance for the intended exception. The current repository does not provide that process.


🧠 Learnings used
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-07-25T10:39:44.005Z
Learning: Applies to src/openms/extern/** : Never modify vendored code under `src/openms/extern/`; use the provided synchronization scripts instead.

You are interacting with an AI system.

@castorNova2 castorNova2 Aug 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so i will move the extern/CMakeLists.txt additions in cmake_findExternalLibs.cmake before opentims block. How about that?. and by this CMakeLists.txt is untouched.

And for changes extern/SQLiteCpp/sqlite3/CMakeLists.txt, this can't be moved that easily.
@jpfeuffer following up on this thread: AGENTS.md prohibits direct edits under src/openms/extern/, and there's no sync script for SQLiteCpp(unlike thirparty percolator which have some script). What left is a small guard is sqlite3 CMakeLists.txt which prevent a configure crash when opentims claims the name first. Coderrabbitai suggest direct edits are prohibited. Ok to keep this edit here or would you like to advise some mechanism?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally there is no CMake inside openms for dependencies at all!
This was just a mechanism because those libraries were not available easily.
Everything should be moved to vcpkg ports.
I am pretty sure SQLiteCpp exists already.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally there is no CMake inside openms for dependencies at all! This was just a mechanism because those libraries were not available easily. Everything should be moved to vcpkg ports. I am pretty sure SQLiteCpp exists already.

OK, happy to force USE_EXTERNAL_SQLITECPP=ON under OPENMS_USE_VCPKG so bundled extern sqlite and alias collision issue is bypassed entirely.

Would you like me to want other extern deps like eol-bspline,isospec, nlohmann-json and simde move to same mechanism?
Also I think the alias collision will still occur in non-vcpkg build between system sqlite3 and bundled sqlite3 without the guard in src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt at line 14?

Comment thread vcpkg.json Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
vcpkg-overlays/ports/onnxruntime/fix-clang-waitpkg-and-tpause-builtin.patch (1)

10-16: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Preserve TPAUSE on Clang Linux.

Set has_tpause_ from data[2] & (1 << 5) for Clang. Then call _tpause() under the WAITPKG feature guard. The current code forces eligible Clang/Linux Intel builds to use _mm_pause() even when WAITPKG is available.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vcpkg-overlays/ports/onnxruntime/fix-clang-waitpkg-and-tpause-builtin.patch`
around lines 10 - 16, Update the Clang branch that initializes has_tpause_ to
derive support from data[2] & (1 << 5) instead of forcing false. In the WAITPKG
feature-guarded path, invoke _tpause() when has_tpause_ is true, preserving
_mm_pause() only as the fallback when TPAUSE is unavailable.

Source: MCP tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@vcpkg-overlays/ports/onnxruntime/fix-clang-waitpkg-and-tpause-builtin.patch`:
- Around line 10-16: Update the Clang branch that initializes has_tpause_ to
derive support from data[2] & (1 << 5) instead of forcing false. In the WAITPKG
feature-guarded path, invoke _tpause() when has_tpause_ is true, preserving
_mm_pause() only as the fallback when TPAUSE is unavailable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 26954848-5420-4c28-afbb-11bfa5557ea4

📥 Commits

Reviewing files that changed from the base of the PR and between 30fa2d6 and 0d8adbf.

📒 Files selected for processing (1)
  • vcpkg-overlays/ports/onnxruntime/fix-clang-waitpkg-and-tpause-builtin.patch

@jpfeuffer

Copy link
Copy Markdown
Contributor

Good Progress but please check the code rabbit comments.

@castorNova2

castorNova2 commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor Author

@pjones Could you please check this PR?

Everything is for review except src directory in eol-bspline and isospec overlay port(since they are just idential as their vendored library) but CMakeLists of both of them under src directory is changed for overlay port so included for review, onnxruntime overlay port is same as upstream vcpkg port except "fix-clang-waitpkg-and-tpause-builtin.patch", and glpk ovelay port is also same as upstream vcpkg port except line 47 in portfile.cmake which sets C17 as C standard.

@jpfeuffer

Copy link
Copy Markdown
Contributor

glpk ovelay port is also same as upstream vcpkg port except line 47 in portfile.cmake which sets C17 as C standard.

I wonder if overlay ports can just be diffs to upstream ports? Sounds tedious to keep full copies in sync.

@castorNova2

castorNova2 commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Update:

  • Changes to opentims in cmake_findExternalLibs.cmake since sqlite3 can come from multiple sources i.e., system, extern, vcpkg. The original code inject bare sqlite3 before the real targers like SQLite::SQLite3, SQLiteCpp and vcpkg's sqlite3 even available, which causes hard link failures in Windows and silent linking against system sqlite3 in Linux and macOS. Added an injection logic in a function and defers it via cmake_language(DEFER CALL ...) so it runs after add_subdirectory(src)` completes and all targets are available and links it via if else chain.
  • Added overlay port of pylmcf, wnet and wnetalign.
  • Fixed two build failures with onnxruntime is used via vcpkg, both are caused by vcpkg's onnxruntime::onnxruntime target not fully populating its imported properties. On Windows, INTERFACE_INCLUDE_DIRECTORIES was empty, causing missing header compile error, fixed by adding a fallback which resolved the include path manually. Seperately, on Linux and macOS, IMPORTED_LOCATION was also empty which silently skips installing libonnxruntiem.so/dynlib into built package, fixed with a similar fallback which resolved library path manually.
  • Added a arm64-osx-dynamic-sysroot-debug.cmake‎ which enables debug flag for vcpkg build dependencies.

@castorNova2

castorNova2 commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor Author

glpk ovelay port is also same as upstream vcpkg port except line 47 in portfile.cmake which sets C17 as C standard.

I wonder if overlay ports can just be diffs to upstream ports? Sounds tedious to keep full copies in sync.

From what I understand overlay port act as a drop-in replacement for an existing port or as a new port. While resolving package names, overlay ports take priority which means it must have its own portfile.cmake and vcpkg.json atleast and is a self contained copy independent to any upstream equivalent port and vcpkg ignores upstream version entirely when overlay is present. So vcpkg natively doesn't support any diffs to upstream ports.

How about a workaround where we can have a shell script which: reads openms's vcpkg pinned baseline, fetch upstream port, apply a patch(i.e., the minor change for which we create glpk overlay port) and write the resulting files to vcpkg-overlays/ports/glpk?

@castorNova2
castorNova2 requested a review from pjones August 13, 2026 15:17
@castorNova2
castorNova2 force-pushed the vcpkg_linux_integration branch from 6097485 to f2799ad Compare August 14, 2026 08:52
@castorNova2
castorNova2 force-pushed the vcpkg_linux_integration branch from 5326892 to 21e59f0 Compare August 14, 2026 14:39
@castorNova2

castorNova2 commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Update:

@pjones

Changed source of eol-bspline and isospec from overlay port directory itself to extern.
test branch ci run: https://github.com/castorNova2/OpenMS/actions/runs/31804877483/job/94781277464, https://github.com/castorNova2/OpenMS/actions/runs/31804877424
(the linux arm64 giving error for coinutils library in first run link for past few days, so you can ignore it. Main vcpkg ci file isn't facing this issue)

Some trade-off of this approach:

  • Now the overlay port of eol-bspline and isospec is heavily dependent of openms's extern directory. The discovery path in portfile.cmake is relative to the extern directory and any changes to the extern libs path will make vcpkg unable to build overlay port. Both lib overlay port has some patches and any changes to the file affecting this patches in extern must also reflect in the patch files.

  • Both overlay port are not standalone so can't be easily reuse outside of OpenMS.

But despite the trade-offs, the benefits outweigh them.

@castorNova2
castorNova2 force-pushed the vcpkg_linux_integration branch from d2a0cb2 to 352cdc4 Compare August 15, 2026 10:39
@pjones
pjones merged commit c77f588 into OpenMS:develop Aug 17, 2026
33 checks passed
@castorNova2 castorNova2 mentioned this pull request Aug 18, 2026
2 of 5 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Aug 19, 2026
1 of 5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants