Avoid tuning compiler for wrong cpu.
@@ -218,12 +218,14 @@ function(vespa_use_default_build_settings)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${DEFAULT_CMAKE_SHARED_LINKER_FLAGS}" PARENT_SCOPE)
endif()
if(NOT DEFINED DEFAULT_VESPA_CPU_ARCH_FLAGS)
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
if(VESPA_OS_DISTRO STREQUAL "fedora" AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(DEFAULT_VESPA_CPU_ARCH_FLAGS "-march=westmere -mtune=haswell")
else()
set(DEFAULT_VESPA_CPU_ARCH_FLAGS "-mtune=intel")
endif()
endif()
+ endif()
if(DEFINED DEFAULT_CMAKE_PREFIX_PATH)
message("-- DEFAULT_CMAKE_PREFIX_PATH is ${DEFAULT_CMAKE_PREFIX_PATH}")
endif()
