Fix BUILD_GUI_VIEWERS ignoring HABITAT_BUILD_GUI_VIEWERS env var#2641
Open
Functionhx wants to merge 1 commit into
Open
Fix BUILD_GUI_VIEWERS ignoring HABITAT_BUILD_GUI_VIEWERS env var#2641Functionhx wants to merge 1 commit into
Functionhx wants to merge 1 commit into
Conversation
…ebookresearch#2620) Building from source via pip install defaults to headless mode because the HABITAT_BUILD_GUI_VIEWERS environment variable is ignored. The pyproject.toml declares BUILD_GUI_VIEWERS = {env = "HABITAT_BUILD_GUI_VIEWERS", default = "ON"} via scikit-build-core's cmake.define, but under --no-build-isolation the resolution does not always propagate the value to CMake, leaving the cached default OFF. Add a direct {HABITAT_BUILD_GUI_VIEWERS} check in CMakeLists.txt before the option() call so the variable is picked up unconditionally, regardless of how scikit-build-core handles cmake.define propagation. Fixes facebookresearch#2620 Test Plan: HABITAT_BUILD_GUI_VIEWERS=ON pip install . --no-build-isolation cmake -L build/... | grep BUILD_GUI_VIEWERS # should show ON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2620
Problem
Building from source via
pip installignores theHABITAT_BUILD_GUI_VIEWERSenvironment variable. The pyproject.toml declaresBUILD_GUI_VIEWERS = {env = "HABITAT_BUILD_GUI_VIEWERS", default = "ON"}via scikit-build-core's cmake.define, but under--no-build-isolationthe resolution does not always propagate the value to CMake, leaving the cached default OFF.Fix
Add a direct
$ENV{HABITAT_BUILD_GUI_VIEWERS}check in CMakeLists.txt before theoption()call so the variable is picked up unconditionally, regardless of how scikit-build-core handles cmake.define propagation. This means:HABITAT_BUILD_GUI_VIEWERS=ON pip install .correctly sets BUILD_GUI_VIEWERS=ONHABITAT_BUILD_GUI_VIEWERS=OFF pip install .correctly sets BUILD_GUI_VIEWERS=OFFTest Plan