|
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.12)
|
|
|
|
|
|
set(ARCH "X86_64" CACHE STRING "Target Architecture")
|
|
|
option(AVX512 "generate code that can make use of avx-512-instructions" ON)
|
|
|
+option(WITH_ASMJIT "use just-in-time-compilation capabilities of asmjit" ON)
|
|
|
|
|
|
#message(CMAKE_SYSTEM_PROCESSOR)
|
|
|
|
|
@@ -41,10 +42,12 @@ if (ARCH STREQUAL "X86_64" OR ARCH STREQUAL "X86")
|
|
|
if (AVX512)
|
|
|
list(APPEND MandelSources src/CpuGeneratorsAVX512.cpp)
|
|
|
endif()
|
|
|
+elseif(ARCH STREQUAL "ARM")
|
|
|
+ list(APPEND MandelSources src/CpuGeneratorsNeon.cpp)
|
|
|
endif()
|
|
|
|
|
|
+
|
|
|
# message(${MandelSources})
|
|
|
-add_subdirectory(asmjit)
|
|
|
|
|
|
add_library(mandel STATIC ${MandelSources})
|
|
|
|
|
@@ -64,7 +67,12 @@ target_include_directories(qd PUBLIC qd-2.3.22/include qd-2.3.22)
|
|
|
#target_include_directories(mandel PUBLI#C qd-2.3.22/include)
|
|
|
#target_include_directories(mandel PUBLI#C qd-2.3.22/include)
|
|
|
target_link_libraries(mandel PUBLIC qd)
|
|
|
-target_link_libraries(mandel PUBLIC asmjit)
|
|
|
+
|
|
|
+if(WITH_ASMJIT)
|
|
|
+ add_subdirectory(asmjit)
|
|
|
+ target_compile_definitions(mandel PUBLIC WITH_ASMJIT)
|
|
|
+ target_link_libraries(mandel PUBLIC asmjit)
|
|
|
+endif(WITH_ASMJIT)
|
|
|
|
|
|
include(CheckIPOSupported)
|
|
|
check_ipo_supported(RESULT LTO_SUPPORTED)
|
|
@@ -119,8 +127,7 @@ if (ARCH STREQUAL "X86_64" OR ARCH STREQUAL "X86")
|
|
|
endif(MSVC)
|
|
|
|
|
|
elseif(ARCH STREQUAL "ARM")
|
|
|
- list(APPEND MandelSources src/CpuGeneratorsNeon.cpp)
|
|
|
- #set_source_files_properties(src/CpuGeneratorsNeon.cpp PROPERTIES COMPILE_FLAGS -mfpu=neon)
|
|
|
+ set_source_files_properties(src/CpuGeneratorsNeon.cpp PROPERTIES COMPILE_FLAGS -march=armv8-a+simd)
|
|
|
endif()
|
|
|
|
|
|
|