[CMAKE] Reduce number of warnings in 3rdparty software

This commit is contained in:
Hannah von Reth 2020-01-17 14:10:12 +01:00 committed by Hannah von Reth
parent d52b2ef89e
commit 9a8288891c
2 changed files with 7 additions and 4 deletions

View File

@ -51,6 +51,9 @@ if (USE_OUR_OWN_SQLITE3)
target_include_directories(sqlite PUBLIC ${CMAKE_SOURCE_DIR}/src/3rdparty/sqlite3)
add_library(SQLite::SQLite3 ALIAS sqlite)
MESSAGE(STATUS "Using own sqlite3 from " ${CMAKE_SOURCE_DIR}/src/3rdparty/sqlite3/)
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
target_compile_options(sqlite PRIVATE -w)
endif()
endif()
configure_file(csync_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/csync_version.h)

View File

@ -62,7 +62,10 @@ add_library(zsync STATIC ../3rdparty/zsync/c/librcksum/hash.c
../3rdparty/zsync/c/libzsync/zsyncfile.c
../3rdparty/zsync/c/progress.c
)
set_target_properties(zsync PROPERTIES C_STANDARD 99)
set_target_properties(zsync PROPERTIES C_STANDARD 11)
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
target_compile_options(zsync PRIVATE -Wno-unused-parameter -Wno-unused-function)
endif()
target_include_directories(zsync PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/3rdparty/zsync/c>)
if ( WIN32 )
@ -128,9 +131,6 @@ GENERATE_EXPORT_HEADER( ${synclib_NAME}
STATIC_DEFINE OWNCLOUD_BUILT_AS_STATIC
)
target_include_directories(${synclib_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
set_target_properties( ${synclib_NAME} PROPERTIES
VERSION ${MIRALL_VERSION}
SOVERSION ${MIRALL_SOVERSION}