File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,21 @@ if(ipo_supported)
238238 message (STATUS "IPO / LTO enabled" )
239239 set_property (GLOBAL PROPERTY INTERPROCEDURAL_OPTIMIZATION True )
240240 add_definitions (-DLTO)
241+ if ((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
242+ OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "i386" )
243+ OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "i586" )
244+ OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" )
245+ OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" ) # freebsd
246+ OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" ) # windows
247+ OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86" ))
248+ set (PROCESSOR_FAMILY "Intel" )
249+ if (CMAKE_COMPILER_IS_GNUCC
250+ OR (CMAKE_CXX_COMPILER_ID STREQUAL AppleClang)
251+ OR (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
252+ OR (CMAKE_CXX_COMPILER_ID STREQUAL Intel))
253+ add_definitions (-march=native)
254+ endif ()
255+ endif ()
241256else ()
242257 message (STATUS "IPO / LTO not supported: <${error} >" )
243258endif ()
You can’t perform that action at this time.
0 commit comments