Author: Michael R. Crusoe Description: Prevent baseline CPU violations Forwarded: not-needed --- iqtree3.orig/cmaple/CMakeLists.txt +++ iqtree3/cmaple/CMakeLists.txt @@ -203,26 +203,6 @@ # Setup compiler flags ################################################################## -## enable 'SSE/AVX' on x86-64, 'neon' on arm to achive faster computations (mainly the Matrix::dotProduct()) -if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") - if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86") - add_compile_options(-msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -mavx) # needed for simde instructions - elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch") - # NHANLT: Because the option "-neon" is not found, - # I changed it to "-march=native" - #add_compile_options(-neon) - if (NOT APPLE AND UNIX) - add_compile_options(-march=armv8-a) - else() - add_compile_options(-march=native) - endif() - endif() -elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86") - add_compile_options(/arch:AVX2) ## not really needed, but may be beneficial in other places when in Release mode (i.e. with optimizations turned on) - endif() -endif() - if (CMAKE_BUILD_TYPE STREQUAL "Release") message("C flags : ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}") message("CXX flags : ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")