P4: The OpenGL ES option stays on when OpenGL is off ("OFF FORCE" without CACHE)
メンテナーはふだん 2 日以内に返信
関連するプルリクエストがすでにマージされています。
- #7489 @Shivansps による — マージ済み
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- cmake, cpp
- 領域
- build-system
調査の方向性
問題のある代入は、CMakeLists.txt にある set(FSO_BUILD_WITH_OPENGL_ES OFF FORCE) です。issue では CMakeLists.txt:272 の要約行の近くにあるとされています。小さなスクリプトで cmake -P を使って評価を再現し、数行下にある、すでにキャッシュ型を使っている OpenXR の行と比較してください。OpenGL を無効、ES を有効にしたときに ES オプションが false になり、USE_OPENGL_ES が定義されず、要約に OFF と表示されれば完了です。issue には修正案が3つあるため、どれを使うかはメンテナーに確認してください。
索引モデルが issue の本文から書いたものです。
説明
Minor: this only matters for a build configured with OpenGL off and the OpenGL ES option on, which is a contradictory setup.
Problem
CMakeLists.txt is meant to turn the OpenGL ES option off when OpenGL itself is off, but the line set(FSO_BUILD_WITH_OPENGL_ES OFF FORCE) has no CACHE BOOL "", so CMake sets a normal variable to the list OFF;FORCE. A non-empty string that isn't a false constant counts as true in if(), so the following if(FSO_BUILD_WITH_OPENGL_ES) still adds -DUSE_OPENGL_ES.
Steps to reproduce
- Configure current master (tested on 8afa31842) with
-DFSO_BUILD_WITH_OPENGL=OFF -DFSO_BUILD_WITH_OPENGL_ES=ON. - Reading the script, the summary line (CMakeLists.txt:272) would then print "With OpenGL ES: OFF;FORCE" and the build would get
USE_OPENGL_ES. I have not run a full configure; step 3 is what I ran. - The same evaluation in isolation, with
cmake -P:set(V ON), thenset(V OFF FORCE), printsvalue=[OFF;FORCE], andif(V)takes the true branch.
Expected vs. actual behavior
- Expected: the ES option is off whenever OpenGL is off.
- Actual: it stays on, as the string
OFF;FORCE.
Proposed fixes
- Add the cache type:
set(FSO_BUILD_WITH_OPENGL_ES OFF CACHE BOOL "" FORCE), as the OpenXR line a few lines below already does. - Or drop
FORCEand set a plain variable (set(FSO_BUILD_WITH_OPENGL_ES OFF)), which is enough for the checks that follow. - Or make it a configure error, so the contradictory setup is reported instead of silently corrected.
- 主要言語
- C++
- スター
- 488
- フォーク
- 184
- 平均マージ
- 6日 1分
- マージ済み PR(30日)
- 42
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
scp-fs2open/fs2open.github.com のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
scp-fs2open/fs2open.github.com#7983 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
scp-fs2open/fs2open.github.com#7969 ·
メンテナーはふだん 2 日以内に返信
-
P4: Standalone web API can read past its request buffer on a large request body対応中かも @dustinspace217 が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
scp-fs2open/fs2open.github.com#7965 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
scp-fs2open/fs2open.github.com#7956 ·
メンテナーはふだん 2 日以内に返信
-
bug HUD LLM-suggested
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
scp-fs2open/fs2open.github.com#7953 ·
メンテナーはふだん 2 日以内に返信
scp-fs2open/fs2open.github.com の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
ROCm/AMDMIGraphX#5490 ·
メンテナーはふだん 2 日以内に返信
-
符号半角全角问题オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
arvidn/libtorrent#9126 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Sunrisepeak/mcpp-language-server#80 ·
メンテナーはふだん 1 日以内に返信