Repository navigation
fix: isolate CMake optimization flags from consumers - #136
Merged
Merged
Conversation
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.
Summary
Linking
rabitqlib::rabitqlibcurrently adds RaBitQ's-O3and-march=nativeoptions to downstream compilation. This can override an application's optimization choices and unexpectedly enable host-specific instructions.Move optimization and native-tuning options to private first-party target configuration. Preserve public C++17, OpenMP, MSVC header definitions, and explicit sanitizer instrumentation/runtime requirements. The library's native-optimization default remains unchanged; a native-built library is still not portable across CPUs.
Add source-tree and installed-consumer checks for evaluated usage requirements, plus coverage of both rotators across IVF and SymphonyQG. Extend CI to cover native, Windows, and sanitized installed consumers, and document the build-policy boundary. No public API, persisted-format, or dependency changes.
Testing
Local Linux x86-64 validation at
e963244using GCC 14.3, Clang 15.0.7, and CMake 3.28.3:main(1d4783a): the new consumer check rejects the leaked-O3option.add_subdirectoryconsumers: runtime and option checks passed.-O1configurations: passed. Actual commands retain the consumer's-O1while keeping RaBitQ's optimization flags private.OpenMPBindingwith its required environment.git diff --check.Windows/MSVC, macOS/AppleClang, and ARM64 were not run locally. Python package/wheel and sample builds were not exercised; their updated CMake helper call sites were reviewed. No performance claim is made.