fix(cmake): Correctly report system BLAS in summary #7230
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.
fix(cmake): Correctly report system BLAS in configuration summary
Type
Motivation and Context
When configuring Open3D with the
USE_SYSTEM_BLAS=ON
option, the final configuration summary table incorrectly reportedBLAS ..... no
. This occurred even though CMake successfully found the system BLAS/LAPACK libraries and configured the build to use them (verified viaCMakeCache.txt
and the addition of theUSE_BLAS
preprocessor definition).This misleading summary output could cause confusion for users building with system BLAS. This change corrects the summary output to accurately reflect the configuration.
Checklist:
python util/check_style.py --apply
to apply Open3D code style to my code.Description
This PR modifies the
cmake/Open3DPrintConfigurationSummary.cmake
script.The original logic for printing the status of third-party dependencies checked for the existence of an internal CMake target (
Open3D::3rdparty_${dep_lower}
). However, whenUSE_SYSTEM_BLAS=ON
, this target (Open3D::3rdparty_blas
) is apparently not created, causing the script to fall into theelse
block and print"no"
.The fix adds a specific condition within this
else
block: if the dependency being checked is"BLAS"
and theUSE_SYSTEM_BLAS
variable is ON, it now correctly prints"yes (system)"
instead of"no"
. This ensures the summary accurately reflects the use of a system-provided BLAS library.Before:
-- Third-Party Dependencies: -- BLAS .................................... no
After:
-- Third-Party Dependencies: -- BLAS .................................... yes (system)