Better warnings suppression for SQLite.

GitOrigin-RevId: dc7d0c93b2e9a5f0511d31fb4f25c2ec3b9c2870
This commit is contained in:
levlam 2018-02-28 03:03:03 +03:00
parent b94927c13c
commit 7988048597

View File

@ -31,19 +31,19 @@ if (NOT WIN32)
target_compile_definitions(tdsqlite PRIVATE -DHAVE_USLEEP -DNDEBUG=1) target_compile_definitions(tdsqlite PRIVATE -DHAVE_USLEEP -DNDEBUG=1)
endif() endif()
if (GCC OR CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations -Wno-unused-variable -Wno-unused-const-variable -Wno-unused-function")
if (CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-parentheses-equality -Wno-unused-value")
endif()
elseif (MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996")
endif()
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
target_compile_definitions(tdsqlite PRIVATE -DSQLITE_OS_WINRT=1) target_compile_definitions(tdsqlite PRIVATE -DSQLITE_OS_WINRT=1)
endif() endif()
if (GCC OR CLANG)
target_compile_options(tdsqlite PRIVATE "-Wno-deprecated-declarations -Wno-unused-variable -Wno-unused-const-variable -Wno-unused-function")
if (CLANG)
target_compile_options(tdsqlite PRIVATE "-Wno-parentheses-equality -Wno-unused-value")
endif()
elseif (MSVC)
target_compile_options(tdsqlite PRIVATE /wd4996)
endif()
install(TARGETS tdsqlite EXPORT TdTargets install(TARGETS tdsqlite EXPORT TdTargets
LIBRARY DESTINATION lib LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib ARCHIVE DESTINATION lib