On 28-Mar-16 21:05, Brad King wrote:
On 03/28/2016 01:49 AM, Geoffrey Viola wrote:
Thanks for the feedback. I’ll have to look more in-depth at Xcode specific 
issues.
Take a look at this approach:
* https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression
I took a look at your repository. It’s very sophisticated.
I'd prefer to see an approach that abstracts the warning levels
in a similar way to COMPILE_FEATURES, COMPILE_DEFINITIONS,
INCLUDE_DIRECTORIES, etc.  Project code would set directory or
target properties to specify warning levels and the generators
would map them to the proper flags or project file settings
automatically.

Something like this has long been missing for compiler warnings
and optimization levels.

-Brad

One more note. Properties is a good abstraction and works great for the native CMake project. But there is a tricky scenario about them - when we need to create ExternalProject_Add for the non-CMake project. E.g. when I have CMAKE_POSITION_INDEPENDENT_CODE variable set to `YES` I need to add `-fPIC` to the flags manually, or check `CXX_STANDARD 11` and add `-std=c++11`. I guess I can handle such simple cases but I can predict that for warnings it will be a huge pain.
How CMake can help me avoid violating DRY?

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-developers

Reply via email to