mirror of https://github.com/WerWolv/ImHex.git
51 lines
1.0 KiB
CMake
51 lines
1.0 KiB
CMake
cmake_minimum_required(VERSION 3.16)
|
|
|
|
project(algorithms_test)
|
|
|
|
|
|
# Add new tests here #
|
|
set(AVAILABLE_TESTS
|
|
# Common
|
|
TestSucceeding
|
|
TestFailing
|
|
TestProvider_read
|
|
TestProvider_write
|
|
|
|
# Endian
|
|
32BitIntegerEndianSwap
|
|
64BitFloatEndianSwap
|
|
|
|
# Crypto
|
|
EncodeDecode16
|
|
EncodeDecode64
|
|
CRC32
|
|
CRC32Random
|
|
CRC16
|
|
CRC16Random
|
|
CRC8
|
|
CRC8Random
|
|
md5
|
|
sha1
|
|
sha224
|
|
sha256
|
|
sha384
|
|
sha512
|
|
)
|
|
|
|
|
|
add_executable(algorithms_test
|
|
source/main.cpp
|
|
|
|
source/common.cpp
|
|
source/endian.cpp
|
|
source/crypto.cpp
|
|
)
|
|
target_include_directories(algorithms_test PRIVATE include)
|
|
target_link_libraries(algorithms_test libimhex)
|
|
|
|
set_target_properties(algorithms_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
|
|
|
foreach (test IN LISTS AVAILABLE_TESTS)
|
|
add_test(NAME "Algorithms/${test}" COMMAND algorithms_test "${test}" WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
|
endforeach ()
|