Open MattWenham opened 3 months ago
Suggest the following addition to the CMakeLists.txt
to accommodate:
Currently the compiler flag options cover the following:
if(MSVC)
SET(CMAKE_CXX_FLAGS "/EHsc /arch:AVX2")
SET(CMAKE_CXX_FLAGS_DEBUG "/W4")
elseif(DARWIN)
SET(CMAKE_CXX_FLAGS "-Wno-int-in-bool-context -std=c++11")
SET(CMAKE_CXX_FLAGS_DEBUG "-Wall")
else()
SET(CMAKE_CXX_FLAGS "-march=native -Wno-int-in-bool-context -std=c++11 -mavx -mfma")
SET(CMAKE_CXX_FLAGS_DEBUG "-Wall")
endif()
Suggest adding a further outcome to cover explicitly the aarch64
compilation and remove flags which cause built errors:
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
SET(CMAKE_CXX_FLAGS "-march=native -Wno-int-in-bool-context -std=c++11")
SET(CMAKE_CXX_FLAGS_DEBUG "-Wall")
I have tested this solution and it builds without issue on aarch64
machine.
Thank you @MattWenham and @ecm200 . We will take a look and update CMakeLists.txt
accordingly soon.
Version 0.4.8 fails to compile for AARCH64 / ARM64 due to the two x86 specific compiler flags in
CMakeLists.txt
:-mavx
and-mfma
.CMakeLists.txt
ideally needs to take into account architecture as well as platform.