86cb17b Pass include directories with response files to GNU on Windows
9a0b9bc Optionally pass include directories with response files
6e8a67f Generate target-wide flags before individual build rules
d099546 Factor old-style -D flags out from -I flag generation
The GNU 4.x toolchain on MinGW (and therefore MSYS) allows compiler
options to be passed via response files. Use this to pass include
directory -I options. This allows the include file search path to be
very long despite shell and mingw32-make command line length limits.
Commit 6a61a8a5 (Honor module .def files with MinGW tools, 2011-02-21)
set CMAKE_LINK_DEF_FILE_FLAG to "-Wl," to enable passing .def files to
the linker on MinGW. However, older GNU tools in the MSYS shell do not
know how to translate "-Wl,/c/..." to "c:/..." and complain that the
file does not exist. Instead set the flag to just "" which tells CMake
it can pass the file through the front-end with no special flag.
Since commit 024d05ad (Fix use of module .def files for MS tools,
2009-09-29) module .def files work for any platform that sets
CMAKE_LINK_DEF_FILE_FLAG correctly. Set it in the Windows-GNU platform
information file to enable support with MinGW tools. Also enable the
test added by commit 0db2c850 (Test use of module .def files for MS
tools, 2009-09-29) for MinGW and MSYS generators.
Use a combination of response files and the archiver to support long
object file lists that do not fit in the Windows command-line length
limit. This can work only with GCC >= 4 because the MinGW GCC 3.x
front-ends do not support response-file syntax.
Commit "Modernize GNU compiler info on Windows" (2009-12-02) reorganized
GNU flags on Windows but let -fPIC slip through for compilation of
objects in shared libraries. While this flag is valid on most GNU
compiler platforms we need to suppress it in Windows-GNU.cmake just as
we already do in CYGWIN-GNU.cmake.
This moves GNU compiler info on Windows into new-style modules
Platform/Windows-GNU-<lang>.cmake
using language-independent helper module
Platform/Windows-GNU.cmake
to define macros consolidating the information.