[Build] Document USE_CXL and ENABLE_MULTI_PROTOCOL as CMake options#8
Open
stmatengss wants to merge 1 commit intohemist/cxl-level-storefrom
Open
[Build] Document USE_CXL and ENABLE_MULTI_PROTOCOL as CMake options#8stmatengss wants to merge 1 commit intohemist/cxl-level-storefrom
stmatengss wants to merge 1 commit intohemist/cxl-level-storefrom
Conversation
USE_CXL and ENABLE_MULTI_PROTOCOL were undocumented compile flags that could only be discovered by reading #ifdef guards in source files. Add proper option() declarations in the top-level CMakeLists.txt with descriptive help strings, add_compile_definitions() wiring, and a dependency warning when ENABLE_MULTI_PROTOCOL is ON without USE_CXL. Build examples: cmake -DUSE_CXL=ON .. cmake -DUSE_CXL=ON -DENABLE_MULTI_PROTOCOL=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.
Problem
USE_CXLandENABLE_MULTI_PROTOCOLwere undocumented compile-time flags only discoverable by reading#ifdefguards in source code. They had nooption()declarations, no help strings, and noadd_compile_definitions()wiring in CMake. Users had to pass them as opaque-Dflags with no guidance.Fix
Add
option()declarations with descriptive help strings andadd_compile_definitions()in the top-levelCMakeLists.txt, following the same pattern asSTORE_USE_ETCDandSTORE_USE_REDIS. Also add amessage(WARNING)whenENABLE_MULTI_PROTOCOL=ONwithoutUSE_CXL=ONsince the former requires the latter.Usage after this change
Impact
cmake-guiandccmakewill now show these options