mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-21 21:17:19 +00:00
[host] cmake: use -march=x86-64-v2 when it becomes available
GCC 11 will support x86_64 micro-architecture feature levels. What we really want to support is nehalem or newer, which is x86-64-v2, and specifying this instead of nehalem means that we are not tuning for nehalem specifically.
This commit is contained in:
parent
f5ad14b109
commit
0525515bee
@ -17,9 +17,14 @@ if(OPTIMIZE_FOR_NATIVE)
|
|||||||
add_compile_options("-march=native")
|
add_compile_options("-march=native")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
CHECK_C_COMPILER_FLAG("-march=nehalem" COMPILER_SUPPORTS_MARCH_NEHALEM)
|
CHECK_C_COMPILER_FLAG("-march=x86-64-v2" COMPILER_SUPPORTS_MARCH_X86_64_V2)
|
||||||
if(COMPILER_SUPPORTS_MARCH_NEHALEM)
|
if(COMPILER_SUPPORTS_MARCH_X86_64_V2)
|
||||||
add_compile_options("-march=nehalem")
|
add_compile_options("-march=x86-64-v2")
|
||||||
|
else()
|
||||||
|
CHECK_C_COMPILER_FLAG("-march=nehalem" COMPILER_SUPPORTS_MARCH_NEHALEM)
|
||||||
|
if(COMPILER_SUPPORTS_MARCH_NEHALEM)
|
||||||
|
add_compile_options("-march=nehalem")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user