cmake: Simplify setting arch flags on macOS

This commit is contained in:
Florent Castelli 2017-01-25 05:49:47 +01:00
parent 3e28ebc31e
commit 925297d528

View File

@ -255,12 +255,8 @@ if(APPLE)
endif() endif()
# Specify target CPUs. # Specify target CPUs.
set(TARGET_FLAGS "${TARGET_FLAGS} -mssse3") check_and_add_flag(HAVE_MSSSE3 -mssse3)
set(TARGET_FLAGS "${TARGET_FLAGS} -march=core2") check_and_add_flag(HAVE_ARCH_CORE2 -march=core2)
# Target flags apply to both C and C++ compilation.
# CMake passes these to the compiler on the link command line as well.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_FLAGS}")
# Linker flags. # Linker flags.
# Drop unreachable code and data. # Drop unreachable code and data.