Skip to content
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

CheckSupportSSE2: Fix sse flags unexpected propagation #1721

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions share/cmake/utils/CheckSupportSSE2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

include(CheckCXXSourceCompiles)

set(_cmake_required_flags_old "${CMAKE_REQUIRED_FLAGS}")

if(NOT CMAKE_SIZE_OF_VOID_P EQUAL 8)
# As CheckCXXCompilerFlag implicitly uses CMAKE_CXX_FLAGS some custom flags could trigger
# unrelated warnings causing a detection failure. So, the code disables all warnings to focus
Expand All @@ -27,4 +29,7 @@ check_cxx_source_compiles ("
}"
HAVE_SSE2)

set(CMAKE_REQUIRED_FLAGS "${_cmake_required_flags_old}")
unset(_cmake_required_flags_old)

mark_as_advanced(HAVE_SSE2)