# HG changeset patch # User David Demelier # Date 1691694669 -7200 # Node ID 78eb9f7a64f039bfaf9a2fcd08790f027fc7b325 # Parent 23bbe3f71dbd9b98ee022e1dbe24738454133967 cmake: pet some warnings on Xcode diff -r 23bbe3f71dbd -r 78eb9f7a64f0 CMakeLists.txt --- 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 () diff -r 23bbe3f71dbd -r 78eb9f7a64f0 extern/libsqlite/CMakeLists.txt --- 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(