aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVitaly Chikunov <vt@altlinux.org>2019-02-15 22:18:08 +0300
committerVitaly Chikunov <vt@altlinux.org>2019-02-15 23:21:56 +0300
commit32da2bf229ba8bebf2c6f6ac1fc016c49e867488 (patch)
treebba75e3d7c0bb4e322ee55555914cae7182d1ff1 /CMakeLists.txt
parentb629c446ff7246e526999bfdd2657e774faf306f (diff)
downloadgost-engine-32da2bf229ba8bebf2c6f6ac1fc016c49e867488.zip
gost-engine-32da2bf229ba8bebf2c6f6ac1fc016c49e867488.tar.gz
gost-engine-32da2bf229ba8bebf2c6f6ac1fc016c49e867488.tar.bz2
tests: Load just built engine from the output directory
Define ENGINE_DIR for all binary tests. Instead of auto-loading engine using `example.conf' load it directly from the OUTPUT_DIRECTORY for curves tests.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 198d746..0538af5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)