X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=0538af546a0a25bfc5e51341053acf02f5246600;hb=ea0349deee971509f9afd5cafb3734485dec2ce6;hp=261decdd19f79ea0703374eba243e41105a63605;hpb=931811c7142253b80c3a7a8e5e1095a6bdf01774;p=openssl-gost%2Fengine.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 261decd..0538af5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ find_package(OpenSSL 1.1.1 REQUIRED) 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") @@ -182,6 +182,18 @@ endif() 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 + ) +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)