Changeset - r24612:8f668fc7640a
[Not reviewed]
master
0 1 0
Owen Rudge - 3 years ago 2021-01-07 16:04:01
owen@owenrudge.net
Fix: Don't add -mno-sse4 on arm64
1 file changed with 9 insertions and 7 deletions:
0 comments (0 inline, 0 general)
cmake/CompileFlags.cmake
Show inline comments
 
@@ -129,14 +129,16 @@ macro(compile_flags)
 
        endif()
 

	
 
        if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
 
            include(CheckCXXCompilerFlag)
 
            check_cxx_compiler_flag("-mno-sse4" NO_SSE4_FOUND)
 
            if (NOT CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
 
                include(CheckCXXCompilerFlag)
 
                check_cxx_compiler_flag("-mno-sse4" NO_SSE4_FOUND)
 

	
 
            if(NO_SSE4_FOUND)
 
                add_compile_options(
 
                    # Don't use SSE4 for general sources to increase compatibility.
 
                    -mno-sse4
 
                )
 
                if(NO_SSE4_FOUND)
 
                    add_compile_options(
 
                        # Don't use SSE4 for general sources to increase compatibility.
 
                        -mno-sse4
 
                    )
 
                endif()
 
            endif()
 
        endif()
 
    elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
0 comments (0 inline, 0 general)