diff options
author | Richard Levitte <richard@levitte.org> | 2021-02-13 14:45:11 +0100 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@users.noreply.github.com> | 2021-10-11 19:34:09 +0300 |
commit | a3b21ced5bfe2c42a04cfad7d4f8499f27ec31ca (patch) | |
tree | 9698a8fc0516d75c0da467408fdbf3b5903bcd5d /CMakeLists.txt | |
parent | a6014f3569ca1819b6d3060124f8cdc5125f074e (diff) | |
download | gost-engine-a3b21ced5bfe2c42a04cfad7d4f8499f27ec31ca.zip gost-engine-a3b21ced5bfe2c42a04cfad7d4f8499f27ec31ca.tar.gz gost-engine-a3b21ced5bfe2c42a04cfad7d4f8499f27ec31ca.tar.bz2 |
Making a gost provider - move away the error source files
The error source files, e_gost_err.c and e_gost_err.h, are not
suitable for providers as they are, so we need to move those away from
the core library, and leave it to the provider code to deal with it.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bf5b557..ff1a71d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,9 +142,12 @@ set(GOST_GRASSHOPPER_SOURCE_FILES gost_grasshopper_cipher.c ) -set(GOST_CORE_SOURCE_FILES +set(GOST_ERR_SOURCE_FILES e_gost_err.c e_gost_err.h + ) + +set(GOST_CORE_SOURCE_FILES gost_ameth.c gost_pmeth.c gost_ctl.c @@ -214,7 +217,7 @@ set_tests_properties(ciphers PROPERTIES ENVIRONMENT "${TEST_ENVIRONMENT}") # test_curves is an internals testing program, it doesn't need a test env add_executable(test_curves test_curves.c) -target_link_libraries(test_curves gost_core) +target_link_libraries(test_curves gost_core gost_err) add_test(NAME curves COMMAND test_curves) add_executable(test_params test_params.c) @@ -245,12 +248,12 @@ set_tests_properties(context PROPERTIES ENVIRONMENT "${TEST_ENVIRONMENT}") # test_keyexpimp is an internals testing program, it doesn't need a test env add_executable(test_keyexpimp test_keyexpimp.c) #target_compile_definitions(test_keyexpimp PUBLIC -DOPENSSL_LOAD_CONF) -target_link_libraries(test_keyexpimp gost_core) +target_link_libraries(test_keyexpimp gost_core gost_err) add_test(NAME keyexpimp COMMAND test_keyexpimp) # test_gost89 is an internals testing program, it doesn't need a test env add_executable(test_gost89 test_gost89.c) -target_link_libraries(test_gost89 gost_core) +target_link_libraries(test_gost89 gost_core gost_err) add_test(NAME gost89 COMMAND test_gost89) if(NOT SKIP_PERL_TESTS) @@ -266,7 +269,7 @@ if(NOT SKIP_PERL_TESTS) endif() add_executable(sign benchmark/sign.c) -target_link_libraries(sign gost_core ${CLOCK_GETTIME_LIB}) +target_link_libraries(sign gost_core gost_err ${CLOCK_GETTIME_LIB}) # All that may need to load just built engine will have path to it defined. set(BINARY_TESTS_TARGETS @@ -286,6 +289,9 @@ set_property(TARGET ${BINARY_TESTS_TARGETS} APPEND PROPERTY COMPILE_DEFINITIONS add_library(gost_core STATIC ${GOST_LIB_SOURCE_FILES}) set_target_properties(gost_core PROPERTIES POSITION_INDEPENDENT_CODE ON) target_link_libraries(gost_core PRIVATE OpenSSL::Crypto) +add_library(gost_err STATIC ${GOST_ERR_SOURCE_FILES}) +set_target_properties(gost_err PROPERTIES POSITION_INDEPENDENT_CODE ON) +target_link_libraries(gost_err PRIVATE OpenSSL::Crypto) # The GOST engine in module form add_library(gost_engine MODULE ${GOST_ENGINE_SOURCE_FILES}) @@ -293,7 +299,7 @@ add_library(gost_engine MODULE ${GOST_ENGINE_SOURCE_FILES}) # module suffix should be set_target_properties(gost_engine PROPERTIES PREFIX "" OUTPUT_NAME "gost" SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) -target_link_libraries(gost_engine PRIVATE gost_core) +target_link_libraries(gost_engine PRIVATE gost_core gost_err) # The GOST engine in library form add_library(lib_gost_engine SHARED ${GOST_ENGINE_SOURCE_FILES}) @@ -309,14 +315,14 @@ set(GOST_SUM_SOURCE_FILES ) add_executable(gostsum ${GOST_SUM_SOURCE_FILES}) -target_link_libraries(gostsum gost_core) +target_link_libraries(gostsum gost_core gost_err) set(GOST_12_SUM_SOURCE_FILES gost12sum.c ) add_executable(gost12sum ${GOST_12_SUM_SOURCE_FILES}) -target_link_libraries(gost12sum gost_core) +target_link_libraries(gost12sum gost_core gost_err) set_source_files_properties(tags PROPERTIES GENERATED true) add_custom_target(tags |