DaveGamble / cJSON

Ultralightweight JSON parser in ANSI C
MIT License
10.83k stars 3.22k forks source link

Also add custom compiler flags for AppleClang #773

Open ryandesign opened 1 year ago

ryandesign commented 1 year ago

This project adds custom compiler flags when the compiler is "Clang" or "GNU" (gcc). Apple's version of Clang (which comes with Xcode and the Xcode command line tools on macOS) identifies itself not as "Clang" but "AppleClang" so before this PR it did not receive those custom flags.

ryandesign commented 1 year ago

Apple's version of Clang … identifies itself not as "Clang" but "AppleClang"

…when CMP0025 is NEW (i.e. -DCMAKE_POLICY_DEFAULT_CMP0025=NEW is passed to cmake).