mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-03 13:31:11 +03:00
benchmark code present in tests/benchmarks/ directory was linked with libssh dynamically due to which it could use only the functions exposed in the public API of libssh. To be able to use those functions in the benchmark code which are a part of libssh api but not a part of the public api for libssh (examples of such functions are ssh_list api functions), the benchmark code needs to be linked statically to libssh. Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com> Reviewed-by: Sahana Prasad <sahana@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
18 lines
337 B
CMake
18 lines
337 B
CMake
project(libssh-benchmarks C)
|
|
|
|
set(benchmarks_SRCS
|
|
bench_scp.c bench_raw.c benchmarks.c latency.c
|
|
)
|
|
if (WITH_SFTP)
|
|
set(benchmarks_SRCS
|
|
${benchmarks_SRCS}
|
|
bench_sftp.c
|
|
)
|
|
endif (WITH_SFTP)
|
|
|
|
include_directories(${libssh_BINARY_DIR})
|
|
|
|
add_executable(benchmarks ${benchmarks_SRCS})
|
|
|
|
target_link_libraries(benchmarks ssh::static)
|