]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
Issue #808: turn off -Wshorten-64-to-32 for clang builds (aka iOS builds) to workarou...
authorEric Hawicz <erh+git@nimenees.com>
Sun, 30 Jul 2023 15:38:01 +0000 (11:38 -0400)
committerEric Hawicz <erh+git@nimenees.com>
Sun, 30 Jul 2023 15:38:01 +0000 (11:38 -0400)
CMakeLists.txt

index c9d27062f3df2cf9e89347ff7e8700afdacc360e..8d64a6bde457b0c1c74b71ee6ca6ec7555974fe3 100644 (file)
@@ -305,6 +305,11 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL
     endif()
 
     add_definitions(-D_GNU_SOURCE)
+
+    if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
+        # Remove this for 1.0 when we can bump the ABI and actually fix these warnings.
+        set(CMAKE_C_FLAGS           "${CMAKE_C_FLAGS} -Wno-shorten-64-to-32")
+    endif()
 elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
     set(CMAKE_C_FLAGS           "${CMAKE_C_FLAGS} /DEBUG")
     set(CMAKE_C_FLAGS           "${CMAKE_C_FLAGS} /wd4100")