Skip to content

Commit

Permalink
Fixed cmake script. (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Chen authored Feb 10, 2020
1 parent f0afbcb commit 8cb88f3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ set(COMMON_SRC
"${COMMON_TRINARY_DIR}/trit_tryte.c"
"${COMMON_TRINARY_DIR}/tryte_ascii.c"
"${COMMON_TRINARY_DIR}/tryte_long.c"
"${COMMON_TRINARY_DIR}/tryte.c"
# curl
"${COMMON_CRYPTO_DIR}/curl-p/const.c"
"${COMMON_CRYPTO_DIR}/curl-p/curl_p.c"
Expand Down Expand Up @@ -126,6 +127,7 @@ set(UTILS_SRC
"utils/char_buffer.c"
"utils/memset_safe.c"
"utils/system.c"
"utils/input_validators.c"
# hash container
"${HASH_CONTAINERS_DIR}/hash_array.c"
"${HASH_CONTAINERS_DIR}/hash27_queue.c"
Expand Down Expand Up @@ -227,4 +229,14 @@ if(${TRINARY_TEST})
add_trinary_test("test_trit_ptrit.c" "test_trinary_trit_ptrit")
add_trinary_test("test_tryte_ascii.c" "test_trinary_tryte_ascii")
#add_trinary_test("test_tryte_long.c" "test_trinary_tryte_long")

function(add_utils_test test_src test_name)
add_executable(${test_name} "utils/tests/${test_src}")
target_include_directories(${test_name} PUBLIC ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR})
add_dependencies(${test_name} common)
target_link_libraries(${test_name} PUBLIC common unity)
add_test(${test_name} ${test_name})
endfunction(add_utils_test)

add_utils_test("test_input_validators.c" "test_input_validators")
endif()

0 comments on commit 8cb88f3

Please sign in to comment.