1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-29 13:01:13 +03:00

Allow building benchmarks without SFTP

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
This commit is contained in:
Jakub Jelen
2023-03-27 09:41:54 +02:00
parent cd54390188
commit e5a6dc6757
2 changed files with 9 additions and 1 deletions

View File

@ -1,8 +1,14 @@
project(libssh-benchmarks C) project(libssh-benchmarks C)
set(benchmarks_SRCS set(benchmarks_SRCS
bench_scp.c bench_sftp.c bench_raw.c benchmarks.c latency.c 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}) include_directories(${libssh_BINARY_DIR})

View File

@ -48,6 +48,7 @@ struct benchmark benchmarks[]= {
.fct=benchmarks_scp_down, .fct=benchmarks_scp_down,
.enabled=0 .enabled=0
}, },
#ifdef WITH_SFTP
{ {
.name="benchmark_sync_sftp_upload", .name="benchmark_sync_sftp_upload",
.fct=benchmarks_sync_sftp_up, .fct=benchmarks_sync_sftp_up,
@ -63,6 +64,7 @@ struct benchmark benchmarks[]= {
.fct=benchmarks_async_sftp_down, .fct=benchmarks_async_sftp_down,
.enabled=0 .enabled=0
} }
#endif /* WITH_SFTP */
}; };
#ifdef HAVE_ARGP_H #ifdef HAVE_ARGP_H