Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

vcpkg: derive VCPKG_MANIFEST_FEATURES from the WITH_* options instead of requiring both

オープン
#10,143 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
64/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cmake, cpp

調査の方向性

Start in the root CMakeLists.txt, especially the WITH_WNETALIGN option around line 403, and inspect how project() initializes the toolchain before the other options. Compare the ci-base presets and doc/doxygen/install/install-vcpkg.doxygen, plus cmake/cmake_findExternalLibs.cmake:402-440. Done means the relevant features are derived before project(), CI presets no longer duplicate the list, and the preset-discovery hint precedes the first example.

索引モデルが issue の本文から書いたものです。

説明

Follow-up to the two review comments @cbielow left on #9972 (1, 2). That PR is closed and its build-system work merged via #10112, but neither point was carried over, so filing them here.

1. Hide the feature mapping inside CMake

Enabling an optional dependency currently needs two flags kept in sync by hand — the CMake option and the matching vcpkg manifest feature. doc/doxygen/install/install-vcpkg.doxygen:127 documents this as the expected workflow:

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>;..."

@cbielow's question was simply: can't we do that mapping inside CMake?

This is not only a docs-ergonomics issue — it has already produced one real configure failure. WITH_WNETALIGN defaults to ON (CMakeLists.txt:403) while the wnetalign manifest feature is opt-in and only requested by the *-ci presets via ci-base. Configuring windows-x64-debug therefore installed no wnetalign ports, all three find_path calls returned -NOTFOUND, and CMake failed at generate time with three bare variable names (PYLMCF_INC, WNETALIGN_INC, WNET_INC) that never mention wnetalign — see the report. d008f2d worked around it with a find-then-FetchContent fallback (cmake/cmake_findExternalLibs.cmake:402-440), matching what WITH_OPENTIMS and WITH_THERMO_RAW already do, but the two sources of truth remain and the next option added is free to drift again.

Sketch: build the feature list from the WITH_* / USE_EXTERNAL_* options and append it to VCPKG_MANIFEST_FEATURES before the toolchain file runs. Note the ordering constraint — VCPKG_MANIFEST_FEATURES has to be set before project() initializes the toolchain, which is earlier than where most of the option() calls live today, so this likely means moving the relevant options (or a small mapping table) above the project() call in the root CMakeLists.txt.

Once the mapping exists, the *-ci presets no longer need to spell out VCPKG_MANIFEST_FEATURES and the doc section above can shrink to one sentence.

2. Move the preset-discovery hint ahead of the first example

doc/doxygen/install/install-vcpkg.doxygen shows a linux-x64-release example at lines 66-71 and only mentions cmake --list-presets afterwards at line 73. @cbielow's point: a non-Linux reader hits the Linux-specific command first and has no way to know their own preset name yet. Move the cmake --list-presets sentence above the example.

主要言語
C++
スター
623
フォーク
441
平均マージ
18時間 36分
マージ済み PR(30日)
267

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenMS/OpenMS のほかの issue

OpenMS/OpenMS の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。