2020-02-29 21:41:24 +00:00
|
|
|
if (WITH_ASTROBWT)
|
|
|
|
add_definitions(/DXMRIG_ALGO_ASTROBWT)
|
|
|
|
|
|
|
|
list(APPEND HEADERS_CRYPTO
|
|
|
|
src/crypto/astrobwt/AstroBWT.h
|
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND SOURCES_CRYPTO
|
|
|
|
src/crypto/astrobwt/AstroBWT.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
if (XMRIG_ARM)
|
|
|
|
list(APPEND HEADERS_CRYPTO
|
|
|
|
src/crypto/astrobwt/salsa20_ref/ecrypt-config.h
|
|
|
|
src/crypto/astrobwt/salsa20_ref/ecrypt-machine.h
|
|
|
|
src/crypto/astrobwt/salsa20_ref/ecrypt-portable.h
|
|
|
|
src/crypto/astrobwt/salsa20_ref/ecrypt-sync.h
|
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND SOURCES_CRYPTO
|
|
|
|
src/crypto/astrobwt/salsa20_ref/salsa20.c
|
|
|
|
)
|
|
|
|
else()
|
2020-03-10 21:03:16 +00:00
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
|
|
add_definitions(/DASTROBWT_AVX2)
|
2021-08-29 08:35:43 +00:00
|
|
|
list(APPEND SOURCES_CRYPTO src/crypto/astrobwt/xmm6int/salsa20_xmm6int-avx2.c)
|
2021-08-29 11:52:11 +00:00
|
|
|
|
|
|
|
if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Clang)
|
|
|
|
set_source_files_properties(src/crypto/astrobwt/xmm6int/salsa20_xmm6int-avx2.c PROPERTIES COMPILE_FLAGS -mavx2)
|
|
|
|
endif()
|
|
|
|
|
2020-03-10 21:03:16 +00:00
|
|
|
if (CMAKE_C_COMPILER_ID MATCHES MSVC)
|
2020-04-12 13:37:58 +00:00
|
|
|
enable_language(ASM_MASM)
|
2020-03-10 21:03:16 +00:00
|
|
|
list(APPEND SOURCES_CRYPTO src/crypto/astrobwt/sha3_256_avx2.asm)
|
|
|
|
else()
|
2020-04-12 13:37:58 +00:00
|
|
|
enable_language(ASM)
|
2020-03-10 21:03:16 +00:00
|
|
|
list(APPEND SOURCES_CRYPTO src/crypto/astrobwt/sha3_256_avx2.S)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2020-02-29 21:41:24 +00:00
|
|
|
list(APPEND HEADERS_CRYPTO
|
|
|
|
src/crypto/astrobwt/Salsa20.hpp
|
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND SOURCES_CRYPTO
|
|
|
|
src/crypto/astrobwt/Salsa20.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
remove_definitions(/DXMRIG_ALGO_ASTROBWT)
|
|
|
|
endif()
|