[cmake-developers] CMake API for warnings
Geoffrey Viola
Geoffrey.Viola at asirobots.com
Sun Mar 27 01:10:36 EDT 2016
CMake should support an API to manage compiler warnings to simplify a common problem. Using more compilers with high levels of warnings means cheap static analysis and better conformance to standard C++.
Compiler warnings are an easy way to increase program reliability. A use case would be to increase compilation warnings on all internal code, ignore warnings on all 3rd party code, and treat all warnings as errors.
Attached is an initial attempt to control warnings in CMake. The API has a short name (e.g. set_warnings_as_errors) for simplicity and a more technical name (e.g. set_warnings_as_errors_folder) to specify scope. Note that the short name acts on CMake's folder scope and is meant to be global. The current compilers considered are GCC, clang, Green Hills, and MSVC. A CMake Warning is issued if the macro does not support a specific compiler so that conformance can be guaranteed.
Thanks,
Geoffrey Viola
This message contains confidential information and is intended only for the recipient. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately if you have received this e-mail by mistake and delete this e-mail from your system. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160327/202fe264/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-added-common-warning-level-macros.patch
Type: application/octet-stream
Size: 3001 bytes
Desc: 0001-added-common-warning-level-macros.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160327/202fe264/attachment.obj>
More information about the cmake-developers
mailing list