mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Check if the compiler supports "-march=native"
This commit is contained in:
parent
526228442b
commit
af89b62194
1 changed files with 7 additions and 4 deletions
|
@ -90,6 +90,13 @@ else()
|
|||
add_definitions(-DGLX_GLXEXT_PROTOTYPES)
|
||||
endif()
|
||||
|
||||
if(USE_NATIVE_INSTRUCTIONS)
|
||||
CHECK_CXX_COMPILER_FLAG("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE)
|
||||
if(COMPILER_SUPPORTS_MARCH_NATIVE)
|
||||
add_compile_options(-march=native)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
|
||||
# This hides our LLVM from mesa's LLVM, otherwise we get some unresolvable conflicts.
|
||||
|
@ -108,10 +115,6 @@ if(NOT MSVC)
|
|||
|
||||
add_compile_options(-msse -msse2 -mcx16 -mrtm)
|
||||
|
||||
if(USE_NATIVE_INSTRUCTIONS)
|
||||
add_compile_options(-march=native)
|
||||
endif()
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# This fixes 'some' of the st11range issues. See issue #2516
|
||||
if(APPLE)
|
||||
|
|
Loading…
Add table
Reference in a new issue