summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows-GNU.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'GNUtoMS-vs-12'Brad King2014-05-281-1/+3
|\ | | | | | | | | 668e571d GNUtoMS: Add support for VS 2013 (#14936)
| * GNUtoMS: Add support for VS 2013 (#14936)Brad King2014-05-271-1/+3
| | | | | | | | | | | | Add to the Platform/Windows-GNU module list of VS registry entries those for VS 2013. Also add the name "vcvars64.bat" used by VS 10 and above for 64-bit tools.
* | Merge topic 'mingw-archive-no-replace'Brad King2014-04-151-2/+2
|\ \ | | | | | | | | | | | | 39d0ade0 Windows-GNU: Support duplicate object names in large archives (#14874)
| * | Windows-GNU: Support duplicate object names in large archives (#14874)Brad King2014-04-141-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | MinGW: link like on Unix and use compile flags when linkingPeter Kümmel2014-04-151-2/+2
| |
* | Windows: Use response files to specify link libraries for GNU toolsBrad King2014-03-051-1/+4
|/ | | | | | | | | Work around the command-line-length limit by using an @linklibs.rsp response file to pass the flags for link libraries. This allows very long lists of libraries to be used in addition to the existing support for passing object files via response file. Suggested-by: Peter Keuschnigg <peter.keuschnigg@pmu.ac.at>
* Find mingw's windres also when Unix Makefiles are usedPeter Kümmel2012-08-271-0/+4
|
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-1/+1
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Ninja: disable work around when linking with mingwPeter Kümmel2012-07-111-1/+3
| | | | | | | The work around is only needed by older GCCs (only testet 4.4/4.7) Ninja is very new so chances are high that there is also a new mingw. Use slashes in link rsp file, because ar.exe can't handle \.
* Add platform variables for position independent code flagsStephen Kelly2012-06-121-1/+5
| | | | | | | | | | | | | | | | | | | | Store in new platform variables CMAKE_${lang}_COMPILE_OPTIONS_PIC CMAKE_${lang}_COMPILE_OPTIONS_PIE flags for position independent code generation. In almost all cases, this means duplication of the CMAKE_SHARED_LIBRARY_${lang}_FLAGS for the _PIC case and using the assumed pie equivalent for the _PIE case. Note that the GNU compiler has supported -fPIE since 3.4 and that there is no -fPIC on GNU for Windows or Cygwin. There is a possibility that the _PIE variables are not correct. However, as there is no backwards compatibility to be concerned about (as the POSITION_INDEPENDENT_CODE property is not used anywhere yet), the current state suffices.
* Windows-GNU: Remove extra quotes in GNUtoMS rule variableBrad King2011-12-081-1/+1
| | | | | CMake replaces the <TARGET...> tokens with properly quoted values so we do not need an extra set of quotes around them.
* Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .libBrad King2011-12-051-0/+54
| | | | | | | | | | | | | | | | Teach the Windows-GNU.cmake platform file to look for Visual Studio tools matching the target ABI. Add an extra step to the link command for shared libraries and executables that export symbols and on which a new GNUtoMS property is set (initialized by the CMAKE_GNUtoMS option). Tell the GNU linker to output a module definition (.def) file listing exported symbols in addition to the GNU-format import library (.dll.a). Pass the .def file to the MS "lib" tool to construct a MS-format DLL import library (.lib). Teach the install(TARGETS) command to install the MS import library next to the GNU one. Teach the install(EXPORT) and export() command to set the IMPORTED_IMPLIB property pointing at the import library to use the import library matching the tools in the importing project.
* Merge topic 'include-flags-response-file'Brad King2011-03-221-0/+3
|\ | | | | | | | | | | | | | | 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
| * Pass include directories with response files to GNU on WindowsBrad King2011-03-171-0/+3
| | | | | | | | | | | | | | 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.
* | Pass .def files directly to MinGW tools (#9997)Brad King2011-02-231-1/+1
| | | | | | | | | | | | | | | | | | 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.
* | Honor module .def files with MinGW tools (#9997)Brad King2011-02-211-0/+1
|/ | | | | | | | | 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.
* Add support for windows resources with mingw/msys.Bill Hoffman2010-12-231-0/+2
|
* MinGW: Support long object file listsBrad King2010-09-171-1/+34
| | | | | | | 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.
* Merge topic 'module-header-spelling'Brad King2010-08-101-1/+1
|\ | | | | | | | | 2cde67a Modules: Fix spelling 'To distributed' -> 'To distribute'
| * Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
| |
* | No response files with GNU ld <= 2.16 (#10913)Brad King2010-08-061-1/+8
|/ | | | | Older GNU ld does not support the @FILE syntax for response files. Check the ld version on MinGW and MSYS before enabling the syntax.
* Use response file for objects on MinGW and MSYSBrad King2010-03-111-0/+2
| | | | | | | Windows command lines are limited to about 32K so we need to use response files for linking very large lists of object files. See issue #10401.
* Suppress GNU flag -fPIC on WindowsBrad King2010-02-191-0/+2
| | | | | | | | 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.
* Modernize GNU compiler info on WindowsBrad King2009-12-021-0/+77
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.