-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
78 lines (65 loc) · 2.7 KB
/
CMakeLists.txt
File metadata and controls
78 lines (65 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# ------------------------------------------------------------
# This file is part of hcs-crypt of headcode.space
#
# The 'LICENSE.txt' file in the project root holds the software license.
# Copyright (C) 2020-2021 headcode.space e.U.
# Oliver Maurhart <info@headcode.space>, https://www.headcode.space
# ------------------------------------------------------------
include_directories(${CMAKE_SOURCE_DIR}/include;${TEST_BASE_DIR};${GTEST_INCLUDE_DIR};${CMAKE_BINARY_DIR})
link_directories("${GTEST_LIBRARY_PATH};${GMOCK_LIBRARY_PATH}")
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
set(UNIT_TEST_SRC
test_error.cpp
test_factory.cpp
test_family.cpp
test_hello_world.cpp
test_padding.cpp
test_version.cpp
${CMAKE_SOURCE_DIR}/src/bin/cli.cpp
${CMAKE_SOURCE_DIR}/src/bin/explain_algorithm.cpp
${CMAKE_SOURCE_DIR}/src/bin/list_algorithms.cpp
${CMAKE_SOURCE_DIR}/src/bin/run.cpp
${CMAKE_SOURCE_DIR}/src/bin/start.cpp
cli/test_explain_algorithm.cpp
cli/test_list_algorithms.cpp
cli/test_start.cpp
symmetric_cipher/test_copy.cpp
symmetric_cipher/ltc/test_ltc_aes_128_cbc.cpp
symmetric_cipher/ltc/test_ltc_aes_128_ecb.cpp
symmetric_cipher/ltc/test_ltc_aes_192_cbc.cpp
symmetric_cipher/ltc/test_ltc_aes_192_ecb.cpp
symmetric_cipher/ltc/test_ltc_aes_256_cbc.cpp
symmetric_cipher/ltc/test_ltc_aes_256_ecb.cpp
hash/test_nohash.cpp
hash/ltc/test_ltc_md5.cpp
hash/ltc/test_ltc_ripemd128.cpp
hash/ltc/test_ltc_ripemd160.cpp
hash/ltc/test_ltc_ripemd256.cpp
hash/ltc/test_ltc_ripemd320.cpp
hash/ltc/test_ltc_sha1.cpp
hash/ltc/test_ltc_sha224.cpp
hash/ltc/test_ltc_sha256.cpp
hash/ltc/test_ltc_sha384.cpp
hash/ltc/test_ltc_sha512.cpp
hash/ltc/test_ltc_tiger192.cpp
)
if (WITH_OPENSSL)
set(UNIT_TEST_OPENSSL_SRC
hash/openssl/test_openssl_md5.cpp
hash/openssl/test_openssl_ripemd160.cpp
hash/openssl/test_openssl_sha1.cpp
hash/openssl/test_openssl_sha224.cpp
hash/openssl/test_openssl_sha256.cpp
hash/openssl/test_openssl_sha384.cpp
hash/openssl/test_openssl_sha512.cpp
symmetric_cipher/openssl/test_openssl_aes_128_cbc.cpp
symmetric_cipher/openssl/test_openssl_aes_128_ecb.cpp
symmetric_cipher/openssl/test_openssl_aes_192_cbc.cpp
symmetric_cipher/openssl/test_openssl_aes_192_ecb.cpp
symmetric_cipher/openssl/test_openssl_aes_256_cbc.cpp
symmetric_cipher/openssl/test_openssl_aes_256_ecb.cpp
)
endif ()
add_executable(unit-tests ${UNIT_TEST_SRC} ${UNIT_TEST_OPENSSL_SRC})
target_link_libraries(unit-tests hcs-crypt gtest gtest_main gmock gmock_main ${CMAKE_REQUIRED_LIBRARIES})
gtest_add_tests(unit-tests "" AUTO)