Check whether CMAKE_CXX_COMPILER_ID contains the string Clang rather than being exactly equal. This way it also matches AppleClang, which is what CMake uses for the default compiler on macOS; see also:
Add -Wno-sign-compare to the special options for Flex-generated .c files, because Apple's Flex generates code that produces this warning by default. Compare to e.g.:
Check whether
CMAKE_CXX_COMPILER_ID
contains the stringClang
rather than being exactly equal. This way it also matchesAppleClang
, which is what CMake uses for the default compiler on macOS; see also:https://cmake.org/cmake/help/latest/policy/CMP0025.html
Add
-Wno-sign-compare
to the special options for Flex-generated .c files, because Apple's Flex generates code that produces this warning by default. Compare to e.g.:https://github.com/vlm/asn1c/issues/321