tests: Use standard way of setting cmake variables

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Pavol Žáčik <pzacik@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2025-11-25 18:49:18 +01:00
parent 98a844ceb2
commit 3e074a3fba
2 changed files with 4 additions and 4 deletions

View File

@@ -58,8 +58,8 @@ if (SK_DUMMY_LIBRARY)
add_library(sk-dummy SHARED IMPORTED)
set_target_properties(sk-dummy PROPERTIES IMPORTED_LOCATION "${SK_DUMMY_LIBRARY}")
target_link_libraries(${TORTURE_LIBRARY} PRIVATE sk-dummy)
target_compile_definitions(${TORTURE_LIBRARY} PUBLIC HAVE_SK_DUMMY)
target_compile_definitions(${TORTURE_LIBRARY} PUBLIC SK_DUMMY_LIBRARY_PATH="${SK_DUMMY_LIBRARY}")
set(HAVE_SK_DUMMY 1)
set(SK_DUMMY_LIBRARY_PATH ${SK_DUMMY_LIBRARY})
endif()
if (WITH_COVERAGE)
@@ -109,8 +109,6 @@ if (CLIENT_TESTING)
# Link sk-dummy to torture_shared library if available
if (SK_DUMMY_LIBRARY)
target_link_libraries(${TORTURE_SHARED_LIBRARY} PRIVATE sk-dummy)
target_compile_definitions(${TORTURE_SHARED_LIBRARY} PUBLIC HAVE_SK_DUMMY)
target_compile_definitions(${TORTURE_SHARED_LIBRARY} PUBLIC SK_DUMMY_LIBRARY_PATH="${SK_DUMMY_LIBRARY}")
endif (SK_DUMMY_LIBRARY)
target_compile_options(${TORTURE_SHARED_LIBRARY} PRIVATE

View File

@@ -82,3 +82,5 @@
#cmakedefine TIMEOUT_EXECUTABLE "${TIMEOUT_EXECUTABLE}"
#cmakedefine SOFTHSM2_LIBRARY "${SOFTHSM2_LIBRARY}"
#cmakedefine PKCS11SPY "${PKCS11SPY}"
#cmakedefine HAVE_SK_DUMMY 1
#cmakedefine SK_DUMMY_LIBRARY_PATH "${SK_DUMMY_LIBRARY_PATH}"