mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
cmake: Disable deprecation warnings for old known_hosts API
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@ -93,6 +93,8 @@ if (UNIX)
|
|||||||
add_c_compiler_flag("-Wno-error=tautological-compare" SUPPORTED_COMPILER_FLAGS)
|
add_c_compiler_flag("-Wno-error=tautological-compare" SUPPORTED_COMPILER_FLAGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_c_compiler_flag("-Wno-deprecated-declarations" DEPRECATION_COMPILER_FLAGS)
|
||||||
|
|
||||||
# Unset CMAKE_REQUIRED_FLAGS
|
# Unset CMAKE_REQUIRED_FLAGS
|
||||||
unset(CMAKE_REQUIRED_FLAGS)
|
unset(CMAKE_REQUIRED_FLAGS)
|
||||||
endif()
|
endif()
|
||||||
@ -112,3 +114,7 @@ endif()
|
|||||||
|
|
||||||
set(DEFAULT_C_COMPILE_FLAGS ${SUPPORTED_COMPILER_FLAGS} CACHE INTERNAL "Default C Compiler Flags" FORCE)
|
set(DEFAULT_C_COMPILE_FLAGS ${SUPPORTED_COMPILER_FLAGS} CACHE INTERNAL "Default C Compiler Flags" FORCE)
|
||||||
set(DEFAULT_LINK_FLAGS ${SUPPORTED_LINKER_FLAGS} CACHE INTERNAL "Default C Linker Flags" FORCE)
|
set(DEFAULT_LINK_FLAGS ${SUPPORTED_LINKER_FLAGS} CACHE INTERNAL "Default C Linker Flags" FORCE)
|
||||||
|
|
||||||
|
if (DEPRECATION_COMPILER_FLAGS)
|
||||||
|
set(DEFAULT_C_NO_DEPRECATION_FLAGS ${DEPRECATION_COMPILER_FLAGS} CACHE INTERNAL "Default no deprecation flags" FORCE)
|
||||||
|
endif()
|
||||||
|
@ -164,6 +164,12 @@ set(libssh_SRCS
|
|||||||
chachapoly.c
|
chachapoly.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (DEFAULT_C_NO_DEPRECATION_FLAGS)
|
||||||
|
set_source_files_properties(known_hosts.c
|
||||||
|
PROPERTIES
|
||||||
|
COMPILE_FLAGS ${DEFAULT_C_NO_DEPRECATION_FLAGS})
|
||||||
|
endif()
|
||||||
|
|
||||||
if (CMAKE_USE_PTHREADS_INIT)
|
if (CMAKE_USE_PTHREADS_INIT)
|
||||||
set(libssh_SRCS
|
set(libssh_SRCS
|
||||||
${libssh_SRCS}
|
${libssh_SRCS}
|
||||||
|
@ -14,6 +14,11 @@ set(LIBSSH_CLIENT_TESTS
|
|||||||
torture_session
|
torture_session
|
||||||
torture_request_env)
|
torture_request_env)
|
||||||
|
|
||||||
|
if (DEFAULT_C_NO_DEPRECATION_FLAGS)
|
||||||
|
set_source_files_properties(torture_knownhosts.c
|
||||||
|
PROPERTIES
|
||||||
|
COMPILE_FLAGS ${DEFAULT_C_NO_DEPRECATION_FLAGS})
|
||||||
|
endif()
|
||||||
if (WITH_SFTP)
|
if (WITH_SFTP)
|
||||||
if (WITH_BENCHMARKS)
|
if (WITH_BENCHMARKS)
|
||||||
set(SFTP_BENCHMARK_TESTS
|
set(SFTP_BENCHMARK_TESTS
|
||||||
|
Reference in New Issue
Block a user