Mercurial > molko
changeset 601:78eb9f7a64f0
cmake: pet some warnings on Xcode
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 10 Aug 2023 21:11:09 +0200 |
parents | 23bbe3f71dbd |
children | 7e168493f0bd |
files | CMakeLists.txt extern/libsqlite/CMakeLists.txt |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Fri Mar 31 12:35:37 2023 +0200 +++ b/CMakeLists.txt Thu Aug 10 21:11:09 2023 +0200 @@ -40,6 +40,14 @@ else () set(CMAKE_C_FLAGS "-Wno-fixed-enum-extension ${CMAKE_C_FLAGS}") endif () + + # + # For some reason, Xcode generates dozens of more warnings that are + # sometimes a bit too naive + # + if (CMAKE_GENERATOR MATCHES "Xcode") + set(CMAKE_C_FLAGS "-Wno-shorten-64-to-32 ${CMAKE_C_FLAGS}") + endif () elseif (CMAKE_C_COMPILER_ID MATCHES "MSVC") set(CMAKE_C_FLAGS "/D_CRT_SECURE_NO_WARNINGS ${CMAKE_C_FLAGS}") endif ()
--- a/extern/libsqlite/CMakeLists.txt Fri Mar 31 12:35:37 2023 +0200 +++ b/extern/libsqlite/CMakeLists.txt Thu Aug 10 21:11:09 2023 +0200 @@ -25,7 +25,11 @@ ) if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") - list(APPEND OPTIONS -Wno-unused-parameter) + list(APPEND OPTIONS -Wno-unused-parameter -Wno-unused-but-set-variable) + + if (CMAKE_C_COMPILER_ID MATCHES "Clang") + list(APPEND OPTIONS -Wno-constant-logical-operand) + endif () endif () mlk_library(