include_directories(${OPENSSL_INCLUDE_DIR})
if (CMAKE_C_COMPILER_ID MATCHES "Clang")
- add_compile_options(-Qunused-arguments)
+ add_compile_options(-O2 -Werror -Wall -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -ggdb -Qunused-arguments)
elseif(CMAKE_C_COMPILER_ID MATCHES "GNU")
add_compile_options(-O2 -Werror -Wall -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -ggdb)
elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
add_test(NAME sign/verify
COMMAND test_sign)
+add_executable(test_tls test_tls.c)
+target_link_libraries(test_tls gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY})
+add_test(NAME TLS
+ COMMAND test_tls)
+
add_executable(test_context test_context.c)
target_link_libraries(test_context gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY})
add_test(NAME context
add_executable(sign benchmark/sign.c)
target_link_libraries(sign gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} ${CLOCK_GETTIME_LIB})
+# All that may need to load just built engine will have path to it defined.
+set(BINARY_TESTS_TARGETS
+ test_curves
+ test_params
+ test_sign
+ test_context
+ test_grasshopper
+ test_keyexpimp
+ test_gost89
+ test_tls
+ )
+set_property(TARGET ${BINARY_TESTS_TARGETS} APPEND PROPERTY COMPILE_DEFINITIONS ENGINE_DIR="${OUTPUT_DIRECTORY}")
+
add_library(gost_core STATIC ${GOST_LIB_SOURCE_FILES})
set_target_properties(gost_core PROPERTIES POSITION_INDEPENDENT_CODE ON)