2019-02-03 09:49:17 +00:00
|
|
|
if (WITH_CN_GPU AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
2019-02-03 07:44:23 +00:00
|
|
|
|
2019-02-03 13:28:13 +00:00
|
|
|
if (XMRIG_ARM)
|
2019-06-04 12:27:51 +00:00
|
|
|
set(CN_GPU_SOURCES src/crypto/cn/gpu/cn_gpu_arm.cpp)
|
2019-02-03 13:28:13 +00:00
|
|
|
|
2019-02-03 13:43:49 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
2019-06-04 12:20:33 +00:00
|
|
|
set_source_files_properties(src/crypto/cn/gpu/cn_gpu_arm.cpp PROPERTIES COMPILE_FLAGS "-O3")
|
2019-02-03 13:28:13 +00:00
|
|
|
endif()
|
|
|
|
else()
|
2019-06-04 12:20:33 +00:00
|
|
|
set(CN_GPU_SOURCES src/crypto/cn/gpu/cn_gpu_avx.cpp src/crypto/cn/gpu/cn_gpu_ssse3.cpp)
|
2019-02-03 13:28:13 +00:00
|
|
|
|
2019-02-08 20:48:24 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
2019-06-04 12:20:33 +00:00
|
|
|
set_source_files_properties(src/crypto/cn/gpu/cn_gpu_avx.cpp PROPERTIES COMPILE_FLAGS "-O3 -mavx2")
|
|
|
|
set_source_files_properties(src/crypto/cn/gpu/cn_gpu_ssse3.cpp PROPERTIES COMPILE_FLAGS "-O3")
|
2019-02-03 13:28:13 +00:00
|
|
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
2019-06-04 12:20:33 +00:00
|
|
|
set_source_files_properties(src/crypto/cn/gpu/cn_gpu_avx.cpp PROPERTIES COMPILE_FLAGS "/arch:AVX")
|
2019-02-03 13:28:13 +00:00
|
|
|
endif()
|
2019-02-03 07:44:23 +00:00
|
|
|
endif()
|
2019-06-09 08:29:26 +00:00
|
|
|
|
|
|
|
add_definitions(/DXMRIG_ALGO_CN_GPU)
|
2019-02-03 07:44:23 +00:00
|
|
|
else()
|
|
|
|
set(CN_GPU_SOURCES "")
|
|
|
|
|
2019-06-09 08:29:26 +00:00
|
|
|
remove_definitions(/DXMRIG_ALGO_CN_GPU)
|
2019-02-03 07:44:23 +00:00
|
|
|
endif()
|