Also apply Clang-specific flags when the compiler is AppleClang https://github.com/DaveGamble/cJSON/pull/773 --- CMakeLists.txt.orig 2023-07-04 22:22:19.000000000 -0500 +++ CMakeLists.txt 2023-07-09 22:00:44.000000000 -0500 @@ -17,7 +17,7 @@ include(CheckCCompilerFlag) option(ENABLE_CUSTOM_COMPILER_FLAGS "Enables custom compiler flags" ON) if (ENABLE_CUSTOM_COMPILER_FLAGS) - if (("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")) + if (("${CMAKE_C_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")) list(APPEND custom_compiler_flags -std=c89 -pedantic