mirror of https://github.com/status-im/leopard.git
Add -march=native for compilers that support it
This commit is contained in:
parent
01cd769606
commit
817d2c90b9
|
@ -28,6 +28,11 @@ if(NOT CMAKE_BUILD_TYPE)
|
|||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
check_cxx_compiler_flag("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE)
|
||||
if(COMPILER_SUPPORTS_MARCH_NATIVE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
check_cxx_compiler_flag("/O2" CXX_FLAG_O2)
|
||||
check_cxx_compiler_flag("/Oy" CXX_FLAG_Oy)
|
||||
|
|
Loading…
Reference in New Issue