1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-12 18:49:07 +00:00

update CMakeLists.txt

This commit is contained in:
Pavol Rusnak 2014-07-17 16:59:14 +02:00
parent 24beac2cc0
commit 7570ea8c0c

View File

@ -1,12 +1,15 @@
set(SOURCES bignum.c ecdsa.c secp256k1.c sha2.c rand.c hmac.c bip32.c ripemd160.c bip39.c pbkdf2.c base58.c)
cmake_minimum_required(VERSION 2.6)
set(SOURCES aescrypt.c aeskey.c aes_modes.c aestab.c base58.c bignum.c bip32.c bip39.c ecdsa.c hmac.c pbkdf2.c rand.c ripemd160.c secp256k1.c sha2.c)
if(MSVC)
set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX)
endif(MSVC)
add_library(TrezorCrypto STATIC ${SOURCES})
# disable sequence point warning because of AES code
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-sequence-point")
add_executable(tests tests.c aescrypt.c aeskey.c aestab.c aes_modes.c)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-sequence-point")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sequence-point")
add_executable(tests tests.c)
target_link_libraries(tests TrezorCrypto check rt pthread m crypto)
add_test(NAME trezor-crypto COMMAND tests)