|
|
@ -245,6 +245,14 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "s390x") |
|
|
|
endif(HAS_S390X_MARCH_NATIVE) |
|
|
|
endif(HAS_S390X_MARCH_NATIVE) |
|
|
|
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "s390x") |
|
|
|
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "s390x") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64") |
|
|
|
|
|
|
|
CHECK_C_COMPILER_FLAG("-march=loongarch64" HAS_LOONGARCH64) |
|
|
|
|
|
|
|
if(HAS_LOONGARCH64) |
|
|
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mcpu=loongarch64 -mtune=loongarch64") |
|
|
|
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=loongarch64 -mtune=loongarch64") |
|
|
|
|
|
|
|
endif(HAS_LOONGARCH64) |
|
|
|
|
|
|
|
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64") |
|
|
|
|
|
|
|
|
|
|
|
option(PORTABLE "build a portable binary" OFF) |
|
|
|
option(PORTABLE "build a portable binary" OFF) |
|
|
|
option(FORCE_SSE42 "force building with SSE4.2, even when PORTABLE=ON" OFF) |
|
|
|
option(FORCE_SSE42 "force building with SSE4.2, even when PORTABLE=ON" OFF) |
|
|
|
option(FORCE_AVX "force building with AVX, even when PORTABLE=ON" OFF) |
|
|
|
option(FORCE_AVX "force building with AVX, even when PORTABLE=ON" OFF) |
|
|
@ -275,6 +283,9 @@ if(PORTABLE) |
|
|
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^s390x") |
|
|
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^s390x") |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=z196") |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=z196") |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
|
|
|
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^loongarch64") |
|
|
|
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=loongarch64") |
|
|
|
|
|
|
|
endif() |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
else() |
|
|
|
else() |
|
|
|
if(MSVC) |
|
|
|
if(MSVC) |
|
|
|