ZLIB_VERSION_STRING was "1.2.3.#define ZLIB_VERSION "1.2.3"" here, because
the result of the matching for the tweak version was also appended if there
was no TWEAK version and the regexp failed, which gives as result not
an empty string, but the full string.
Now it is only appended if the regexp matches.
Alex
Read zlib.h by using file(STRINGS.....REGEX) to limit the amount of text we apply the version regex on. This patch also addresses the fact that the version string may contain a tweak component.
Patch by Simone Rossetto
Some zlib.h files have ZLIB_VERSION "1.2.3.3" with 4 numbers instead of 3.
The regex is changed to grab the first 3 numbers.
It was slow because if it failed to find that string near the top of the file,
where it usually is, it would read the entire file.
This adds copyright/license notification blocks CMake's find-modules.
Many of the modules had no notices at all. Some had notices referring
to the BSD license already. This commit normalizes existing notices and
adds missing notices.
FIND_PACKAGE_HANDLE_STANDARD_ARGS(), so cmake modules can specify their own
better failure messages. If the default is ok use "DEFAULT_MSG".
Do this also for FindBoost.cmake (#5349)
Alex