Skip to content

build: fix CMAKE_REQUIRED_FLAGS format for sanitizer detection #2724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

tchaikov
Copy link
Contributor

@tchaikov tchaikov commented Apr 7, 2025

Use space-delimited string instead of semicolon-separated list for CMAKE_REQUIRED_FLAGS as specified in the CheckCXXSourceCompiles documentation. This fixes sanitizer detection by correctly passing compiler flags when checking for sanitizer support.

Previously, we incorrectly converted a space-delimited string to a semicolon-list by replacing spaces in Sanitizers_COMPILE_OPTIONS, preventing proper detection of combined sanitizer configurations.

Reference: https://cmake.org/cmake/help/latest/module/CheckCXXSourceCompiles.html

Use space-delimited string instead of semicolon-separated list for
`CMAKE_REQUIRED_FLAGS` as specified in the CheckCXXSourceCompiles
documentation. This fixes sanitizer detection by correctly passing
compiler flags when checking for sanitizer support.

Previously, we incorrectly converted a space-delimited string to a
semicolon-list by replacing spaces in `Sanitizers_COMPILE_OPTIONS`,
preventing proper detection of combined sanitizer configurations.

Reference: https://cmake.org/cmake/help/latest/module/CheckCXXSourceCompiles.html

Signed-off-by: Kefu Chai <[email protected]>
@xemul xemul closed this in f05eb1e Apr 8, 2025
@tchaikov tchaikov deleted the cmake-sanitizer branch April 8, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant