Repository navigation
Conversation
cbielow
left a comment
There was a problem hiding this comment.
I've left a few prelim comments.
Currently building locally and running into problems on Windows.
Fixing this will take a while. Will submit fixes to this PR, once its ready.
|
|
||
| @subsection install_vcpkg_optional_deps Optional Dependencies | ||
|
|
||
| Optional %OpenMS features that pull in additional dependencies (HDF5, ONNX Runtime, the Wasserstein network alignment libraries, etc.) need **two** things to be turned on together: the corresponding CMake option (e.g. `-DWITH_HDF5=ON`, `-DWITH_ONNX=ON`) *and* the matching vcpkg manifest feature via `-DVCPKG_MANIFEST_FEATURES="<feature1>;<feature2>;..."`, so that vcpkg actually installs the extra dependency. The `*-ci` presets show an example enabling several of these together: |
There was a problem hiding this comment.
can't we hide this from the user and do the mapping inside cmake?
| the preset name for your platform and desired build type; run `cmake --list-presets` | ||
| to see all available presets, including the `*-ci` presets used by the CI pipeline, | ||
| which additionally enable most optional features via `VCPKG_MANIFEST_FEATURES` (see below). | ||
| The resulting build directory is `build/linux-x64-release` (each preset gets its own directory, so debug/release/relwithdebinfo builds don't clash). Substitute the preset name for your platform and desired build type; run `cmake --list-presets` to see all available presets, including the `*-ci` presets used by the CI pipeline, which additionally enable most optional features via `VCPKG_MANIFEST_FEATURES` (see below). |
There was a problem hiding this comment.
this "run cmake --list-presets to see all available presets," should come before the example, so non-Linux don't feel lost
|
one more thing: this is using the underlying reason is: Why this fix: wnetalign was the outlier. WITH_OPENTIMS and WITH_THERMO_RAW are also ON by default with optional vcpkg features, and both use find_package(... QUIET) → FetchContent fallback, which is exactly why they don't break the default preset. wnetalign alone had a find with no guard and no fallback. It now follows the same find-then-fetch shape, so the default preset works out of the box, and when the feature is enabled (the *-ci presets) the vcpkg ports are used instead — you'll see wnetalign: using vcpkg ports in that case. Two notes: The fallback fetches three small header-only repos from GitHub at configure time, so it needs network — same trade-off opentims and the Thermo bridge already make. Yours resolved into build/windows-x64-debug/_deps/. --> So one more reason to have a single point of configuration for the package flags (if that's even possible). What is the general idea here? Use vcpkg only for dependencies which are not installable via package managers? It would not make sense to compile your own boost, when the system ships one, right? If so, will cmake/vcpgk detect preexisting dependencies and not build them? |
…rom subprojects; add MSVC toolset guard before vcpkg runs
… but on by default
…leting CMakeCache.txt and CMakeFiles folder) without every fetched lib complaining about the mismatch (since FetchContent inherited the Generator via subprojects)
|
@cbielow Thank you for looking into this! The general idea is to have a single source for all dependencies (vcpkg) for consistency and reliability. The system is currently opt-in. But if you do use vcpkg then CMake will ignore dependencies installed on the system and only use those in from vcpkg. Unfortunately, we do still depend on some external tools/packages that haven't been integrated via vcpkg. |
|
whops. Sorry, pushed to the wrong branch. undo and prefer #10063 ? |
|
the current state successfully builds on VS2022, both debug and release. Do we still want to advertise contrib? If not, references to it should be removed. |
|
one important thing: I highly recommend adding a Debug build for VS2022 for CI. |
No, I think we want to completely get rid of |
The reason we don't do this is because the builds would take twice as long when you have a cache miss. Maybe we can have a special CI workflow whose only job is to fill the vcpkg cache and doesn't run in response to PRs. Perhaps the nightly run could enable debug builds? What do you think? |
When would a cache miss occur? Only when vcpkg is updated? Or is that cache for all of OpenMS?
I'd prefer it as part of the actual CI. Once a PR is merged, people tend not to care if something breaks the night after. |
Yes, when vcpkg is updated. But also if GitHub changes the OS or compiler versions for the runner.
I agree, but then we hit time limits with GitHub. We're currently talking with Oliver about what build resources we need. |
|
Superseded by #10112, which merged into For the record, the two red checks here were fixed in #10112 by restoring
Dropping the call from directories that are only entered via Three things raised in this thread did not make it into #10112 and are still open on
Let's track those separately rather than on a closed PR. Generated by Claude Code |
|
Filed the three follow-ups from the previous comment:
Generated by Claude Code |
This PR attempts to remove outdated references to the
contribmodule and ensure the documenation for building OpenMS from source is accurate.I opened it as a draft because I don't know what to do with the Windows documentation. The existing documentation for building OpenMS on Windows is quiet extensive and covers many edge cases. I'm not a Windows user/developer so I don't know which sections are no longer relevant and which need to be updated.
If a Windows developer would be willing to update the Windows install doc I would greatly appreciate it.