[CMake] Where do all the extra clang flags come from in Xcode?

Paul Smith paul at mad-scientist.net
Mon May 18 09:20:30 EDT 2015


On Mon, 2015-05-18 at 12:32 +0200, Ruslan Baratov via CMake wrote:
> This table tells you what attribute you need to set to disable/enable
> specific warning.

I see, so these are CMake attributes?  That wasn't clear to me.  I
thought they were attributes of Xcode.

I guess my basic question is, why are all these extra flags to disable
and enable various warnings set in the Xcode generator?  I expected it
would work like the makefile generator, where if you don't set any flags
in CMakeLists.txt then you don't get any warnings enabled (or explicitly
disabled).  It surprises me that when I take the same CMakeLists.txt
file and use a Makefile generator and an Xcode generator, I get very
different compile lines.

And secondarily, is there any way to get the Xcode generator to work
like the Makefile generator, where only the warning flags I explicitly
defined in my CMakeLists.txt file are added to the compile/link lines
and no others?



More information about the CMake mailing list