Commit 125bdcc8 authored by jehan's avatar jehan

fix build without crypto

parent 77088a4e
Pipeline #306 passed with stage
in 0 seconds
......@@ -86,6 +86,7 @@ if(ENABLE_POLARSSL AND NOT MBEDTLS_FOUND)
find_package(PolarSSL REQUIRED)
if(POLARSSL_FOUND)
message(STATUS "Using polarSSL")
set(HAVE_POLARSSL 1)
if(CTR_DRBG_FREE)
set(HAVE_CTR_DRGB_FREE 1)
endif()
......
......@@ -23,6 +23,7 @@
#cmakedefine HAVE_DTLS_SRTP 1
#cmakedefine HAVE_DECAF 1
#cmakedefine HAVE_MBEDTLS 1
#cmakedefine HAVE_POLARSSL 1
#cmakedefine HAVE_CTR_DRGB_FREE 1
#cmakedefine HAVE_CU_GET_SUITE 1
#cmakedefine HAVE_CU_CURSES 1
......
......@@ -27,7 +27,6 @@ set(BCTOOLBOX_C_SOURCE_FILES
vfs.c
vconnect.c
parser.c
crypto/crypto.c
)
set(BCTOOLBOX_CXX_SOURCE_FILES
......@@ -48,7 +47,9 @@ endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
list(APPEND STRICT_OPTIONS_CXX "-x c++")
endif()
if(MBEDTLS_FOUND OR POLARSSL_FOUND)
list(APPEND BCTOOLBOX_C_SOURCE_FILES crypto/crypto.c)
endif()
if(MBEDTLS_FOUND)
list(APPEND BCTOOLBOX_C_SOURCE_FILES crypto/mbedtls.c)
endif()
......
......@@ -32,9 +32,11 @@ if(ENABLE_TESTS AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
bctoolbox_tester.h
containers.cc
port.c
crypto.c
parser.c
)
if(MBEDTLS_FOUND OR POLARSSL_FOUND)
list(APPEND TESTER_SOURCES crypto.c)
endif()
string(REPLACE ";" " " LINK_FLAGS_STR "${LINK_FLAGS}")
......
......@@ -46,7 +46,9 @@ void bctoolbox_tester_init(void(*ftester_printf)(int level, const char *fmt, va_
bc_tester_init(log_handler,BCTBX_LOG_ERROR, 0,NULL);
bc_tester_add_suite(&containers_test_suite);
bc_tester_add_suite(&utils_test_suite);
#if (HAVE_MBEDTLS | HAVE_POLARSSL)
bc_tester_add_suite(&crypto_test_suite);
#endif
bc_tester_add_suite(&parser_test_suite);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment