cmake: honor DISPATCH=OFF #1160
No reviewers
Labels
No labels
announcement
bug
build
CI
dependencies
documentation
duplicate
enhancement
experience feedback
feature request
github_actions
help wanted
install
invalid
Long-term
optimization
portability
question
target-specific
test issue
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-Cyan4973/xxHash!1160
Loading…
Reference in a new issue
No description provided.
Delete branch "fhgffy/fix/cmake-dispatch-off"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The dispatch condition checks whether DISPATCH is defined, so configuring with
-DDISPATCH=OFFstill compiles the x86 dispatcher and enables it in xxhsum. On x86_64, the resulting executable reportsautoVecdespite the option being OFF.Check the value of DISPATCH instead. This preserves the existing behavior when the variable is unset or ON.
Add a check to the Linux CMake job that builds with ON, reconfigures the same directory with OFF, and checks the resulting executable each time. It fails on the current dev branch and passes with this change.
Tested with CMake 3.31.6 and GCC 14.2.0 on Linux x86_64, including shared/static builds and installed CMake consumers.
make SHELL=/bin/bash test MOREFLAGS='-Werror -Wconversion'passes. The largertest-alltarget stops at the 32-bit build because this environment lacks multilib libc headers.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.