From cee03d66a3315f386ce364861e506846ae84760d Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Wed, 10 Mar 2021 14:16:07 -0500 Subject: [PATCH] COMP: removed hardcoded `-march=corei7` compilation flag This fixes building for x86_64 from an arm64 Mac. In my view, a library like ITK should not be assuming what kinds of CPU the resulting executable will be run on. It can't know if the result will only be run on the building machine, or deployed to customers running all kinds of models of computer. Only the programmer building ITK knows this. --- CMake/ITKSetStandardCompilerFlags.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/CMake/ITKSetStandardCompilerFlags.cmake b/CMake/ITKSetStandardCompilerFlags.cmake index b6583c5fce2..910452c1e95 100644 --- a/CMake/ITKSetStandardCompilerFlags.cmake +++ b/CMake/ITKSetStandardCompilerFlags.cmake @@ -240,10 +240,7 @@ function(check_compiler_optimization_flags c_optimization_flags_var cxx_optimiza # Check this list on both C and C++ compilers set(InstructionSetOptimizationFlags # https://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/i386-and-x86_002d64-Options.html - # NOTE the corei7 release date was 2008 - #-mtune=native # Tune the code for the computer used compile ITK, but allow running on generic cpu archetectures -mtune=generic # for reproducible results https://github.com/InsightSoftwareConsortium/ITK/issues/1939 - -march=corei7 # Use ABI settings to support corei7 (circa 2008 ABI feature sets, core-avx circa 2013) ) endif() set(c_and_cxx_flags ${InstructionSetOptimizationFlags})