2017-04-15 06:02:08 +00:00
|
|
|
set(SOURCES
|
|
|
|
../../algo/cryptonight/cryptonight.h
|
|
|
|
../../algo/cryptonight/cryptonight_common.c
|
2017-04-19 07:03:40 +00:00
|
|
|
../../algo/cryptonight/cryptonight_av4_softaes.c
|
2017-04-15 06:02:08 +00:00
|
|
|
../../crypto/c_keccak.c
|
|
|
|
../../crypto/c_blake256.c
|
|
|
|
../../crypto/c_groestl.c
|
|
|
|
../../crypto/c_jh.c
|
|
|
|
../../crypto/c_skein.c
|
2017-04-19 07:03:40 +00:00
|
|
|
../../crypto/soft_aes.c
|
2017-04-15 06:02:08 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
|
|
add_subdirectory(bmi2)
|
|
|
|
|
|
|
|
add_executable(cryptonight_app ${SOURCES}
|
|
|
|
cryptonight.c
|
|
|
|
../../algo/cryptonight/cryptonight_av1_aesni.c
|
2017-04-21 07:40:11 +00:00
|
|
|
../../algo/cryptonight/cryptonight_av2_aesni_stak.c
|
|
|
|
../../algo/cryptonight/cryptonight_av5_aesni_experimental.c
|
2017-04-15 06:02:08 +00:00
|
|
|
)
|
|
|
|
|
2017-04-21 07:40:11 +00:00
|
|
|
target_link_libraries(cryptonight_app unity cryptonight_av3_aesni_bmi2)
|
2017-04-15 06:02:08 +00:00
|
|
|
else()
|
|
|
|
add_executable(cryptonight_app ${SOURCES}
|
|
|
|
cryptonight32.c
|
|
|
|
../../algo/cryptonight/cryptonight_av1_aesni32.c
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(cryptonight_app unity)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include_directories(../..)
|
|
|
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -fno-strict-aliasing")
|
|
|
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2")
|
|
|
|
add_definitions(-DBUILD_TEST)
|
|
|
|
|
|
|
|
add_test(cryptonight_test cryptonight_app)
|