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 @@ -202,6 +202,21 @@ if(ipo_supported)
202
202
message (STATUS "IPO / LTO enabled" )
203
203
set_property (GLOBAL PROPERTY INTERPROCEDURAL_OPTIMIZATION True )
204
204
add_definitions (-DLTO )
205
+ if ((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
206
+ OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "i386" )
207
+ OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "i586" )
208
+ OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" )
209
+ OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" ) # freebsd
210
+ OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" ) # windows
211
+ OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86" ))
212
+ set (PROCESSOR_FAMILY "Intel" )
213
+ if (CMAKE_COMPILER_IS_GNUCC
214
+ OR (CMAKE_C_COMPILER_ID STREQUAL AppleClang )
215
+ OR (CMAKE_C_COMPILER_ID STREQUAL Clang )
216
+ OR (CMAKE_C_COMPILER_ID STREQUAL Intel ))
217
+ add_definitions (-march=native )
218
+ endif ()
219
+ endif ()
205
220
else ()
206
221
message (STATUS "IPO / LTO not supported: <${error} >" )
207
222
endif ()
You can’t perform that action at this time.
0 commit comments