On 18-May-15 15:20, Paul Smith wrote:
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.
Please take a look at examples I've sent earlier. I have no idea how I
can make it even more clearer.
I guess my basic question is, why are all these extra flags to disable
and enable various warnings set in the Xcode generator?
As far as I know this is Xcode defaults. So I guess you need to ask
Apple's Xcode support team.
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.
I guess you can open a bug with feature request. Note that only it's not
enough to just set all this attributes to YES, but also you need to read
compiler flags (+ build types) and change attributes accordingly.
E.g. -Wno-enum-conversion in CMAKE_CXX_FLAGS automatically must add
property `XCODE_ATTRIBUTE_CLANG_WANR_ENUM_CONVERSION NO` to all targets.
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?
Again. Take a look at examples I've sent earlier. The helper function
works exactly like you want. This is the only way known to me to achieve
this nicely.
Cheer, Ruslo
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake