Skip to content

Commit

Permalink
Fix arch selection on ARM (use -mcpu instead of -march) and s390x (en…
Browse files Browse the repository at this point in the history
…able -mzvector)
  • Loading branch information
milot-mirdita committed Mar 10, 2021
1 parent fb39ca1 commit fa4cd2a
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,18 @@ if (NATIVE_ARCH AND (MMSEQS_ARCH STREQUAL ""))
endif ()
message(WARNING "At least SSE4.1 is needed for best performance")
endif ()
if (PPC64)
set(MMSEQS_ARCH "-mcpu=native")
else ()
# clang has a problem with march=native on travis
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.0.0")
set(MMSEQS_ARCH "${SSE_FLAGS}")
else()
set(MMSEQS_ARCH "-march=native")
endif()
endif ()
else ()
if (PPC64)
set(MMSEQS_ARCH "-mcpu=native")
else ()
# clang has a problem with march=native on travis
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.0.0")
set(MMSEQS_ARCH "${SSE_FLAGS}")
else()
set(MMSEQS_ARCH "-march=native")
endif ()
endif()
elseif (PPC64 OR ARM)
set(MMSEQS_ARCH "-mcpu=native")
elseif (ZARCH)
set(MMSEQS_ARCH "-mcpu=native -mzvector")
else ()
set(MMSEQS_ARCH "-march=native")
endif ()
endif ()

Expand Down

0 comments on commit fa4cd2a

Please sign in to comment.