Generalize the change from commit 39d0ade0 (Windows-GNU: Support
duplicate object names in large archives, 2014-04-14) to the default
archive rules. These rules have used an incremental append approach
since commit v2.8.0~1856 (Build large archives incrementally,
2008-08-04). Switch from "ar r" to "ar q" to be sure we always append
objects instead of replacing them.
Extend CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES with these paths. We
already have the equivalents under /usr. Systems that have these
directories have their dynamic loaders configured already. Do not allow
them to appear in the RPATH explicitly.
f21ac16e Replace MATCHES test on numbers with EQUAL test
7eacbaed Replace MATCHES ".+" tests with NOT STREQUAL ""
3a71d34c Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient
b0b4b460 Remove .* expressions from beginning and end of MATCHES regexs
5bd48ac5 Replace string(REGEX REPLACE) with string(REPLACE) where possible
2622bc3f Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
97f2b7f5 Ninja: set correct LANGUAGE_COMPILE_FLAGS when linking
49fcffc6 Ninja: cmake formatting, make code more readable
b735c8cb MinGW: link like on Unix and use compile flags when linking
Since commit v2.6.0~388 (Added build rule variables
CMAKE_<LANG>_ARCHIVE_..., 2008-01-29) we use separate "ar cr ..." and
"ar r ..." steps to incrementally add a large list of object files to an
archive. Since the "r" command replaces existing objects of the same
name in an archive, if multiple objects have the same file name and
appear in separate append steps then one overwrites the other. Instead,
use "ar cq ..." and "ar q ..." to always append to the archive.
We already remove the archive before creating it so this will not cause
objects to be appended to existing archives on incremental rebuilds.
The matches have already been calculated and can simply be taken from
CMAKE_MATCH_n variables. This avoids multiple compilations of the same or very
similar regular expressions.
Warn project developers at runtime that the module should not be used
anymore. Issue the diagnostic only when the project requires a new
enough CMake to use the alternative. Honor the
CMAKE_(ERROR|WARN)_DEPRECATED settings.
Update the logic added by commit 2f9ad7c6 (Fix FindMPI for the intel
compiler on linux, 2012-03-20) to use the implicit link directories for
the current ${lang} instead of hard-coding C or CXX which may not be
enabled. This is necessary for Fortran-only projects.
f0de3f80 CMakeDetermineVSServicePack: Add VS 11 update 4
105658df CMakeDetermineVSServicePack: Match versions more robustly
101515b9 CMakeDetermineVSServicePack: Format documentation
7147ed5c CMakeRCInformation: Recognize 'windres' tools with '.' in name (#14865)
db924e00 CMakeRCInformation: Do not mention 'Fortran' in documentation
A 64-bit MinGW windres is named "i686-w64-mingw32.shared-windres". The
get_filename_component NAME_WE mode may strip the ".shared-windres" part
and cause the result to no longer contain "windres". Instead, match the
"windres" name in the full CMAKE_RC_COMPILER value first, and use the
get_filename_component code path only for other resource compilers.
Use the CMAKE_MATCH_* variables to simplify matching logic. Match
either 3 or 4 version components. Do not fail when there are only three
components available.