The logic in commit c96fe0b4 (cmake: Add -W options to control
deprecation warnings and errors, 2015-07-28) accidentally enables
errors on warnings by default in scripts because there is no
initialization of CMAKE_SUPPRESS_DEVELOPER_ERRORS to TRUE.
Rename internal CMAKE_SUPPRESS_DEVELOPER_ERRORS cache entry to
CMAKE_ERROR_DEVELOPER_WARNINGS. Fix the logic in the message() command
to treat AUTHOR_WARNING as an error only if the option is explicitly
enabled.
Refactor the -Wdev and -Wno-dev to use a generic -W parser that follows
the GCC pattern. Include support for setting CMAKE_ERROR_DEPRECATED and
CMAKE_WARN_DEPRECATED via the deprecated warning. Add -Werror=dev and
-Wno-error=dev options so that dev warning options are in line with
deprecated warning options. Use a new CMAKE_SUPPRESS_DEVELOPER_ERRORS
internal cache entry to store the above new dev options persistently.
Add tests for new options and updated cmake documentation and release
notes to list new options.
Avoid using the std::accumulate algorithm which is designed for
numeric types, not complex types. It introduces unneccessary
copies.
Initialize variables where they are populated.
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
By default, the message is not issued. If CMAKE_ERROR_DEPRECATED
is on, the message is fatal. If CMAKE_WARN_DEPRECATED is on, the
message is a warning.
This converts the CMake license to a pure 3-clause OSI-approved BSD
License. We drop the previous license clause requiring modified
versions to be plainly marked. We also update the CMake copyright to
cover the full development time range.
During testing of the new message() signatures I mistakenly concluded
that SEND_ERROR stops processing. The corresponding commit enforced
this wrong behavior. This restores the correct behavior and fixes the
documentation accordingly.