diff options
author | Brad King <brad.king@kitware.com> | 2008-02-27 22:10:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-02-27 22:10:45 (GMT) |
commit | dfe2ea6406d3ab22f1a4193906611fb67fd3ab6e (patch) | |
tree | e00166515d5fe978ef5fe0dd15852790145951e0 /Modules | |
parent | 4c137bad6b663ff342064c293a49fecf03498207 (diff) | |
download | CMake-dfe2ea6406d3ab22f1a4193906611fb67fd3ab6e.zip CMake-dfe2ea6406d3ab22f1a4193906611fb67fd3ab6e.tar.gz CMake-dfe2ea6406d3ab22f1a4193906611fb67fd3ab6e.tar.bz2 |
ENH: Handle large object file lists on some platforms
- Use a response file when enabled by
CMAKE_<LANG>_USE_RESPONSE_FILE_FOR_OBJECTS
- Enable for C and CXX with cl (MSVC)
- Enable for Fortran with ifort (Intel Fortran)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Platform/Windows-ifort.cmake | 6 | ||||
-rw-r--r-- | Modules/Platform/cl.cmake | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/Modules/Platform/Windows-ifort.cmake b/Modules/Platform/Windows-ifort.cmake index 7ea5581..295fa3e 100644 --- a/Modules/Platform/Windows-ifort.cmake +++ b/Modules/Platform/Windows-ifort.cmake @@ -9,8 +9,10 @@ ENDIF(CMAKE_VERBOSE_MAKEFILE) SET(CMAKE_Fortran_MODDIR_FLAG "-module:") +SET(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1) + SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY - "link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:<TARGET> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}") + "link ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /dll <LINK_FLAGS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}") SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY}) @@ -24,7 +26,7 @@ SET(CMAKE_Fortran_COMPILE_OBJECT SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>") SET(CMAKE_Fortran_LINK_EXECUTABLE - "<CMAKE_Fortran_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> -link <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") + "<CMAKE_Fortran_COMPILER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> -link <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows) SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console) diff --git a/Modules/Platform/cl.cmake b/Modules/Platform/cl.cmake index 6afb73f..c0f014b 100644 --- a/Modules/Platform/cl.cmake +++ b/Modules/Platform/cl.cmake @@ -17,7 +17,7 @@ ELSE(CMAKE_VERBOSE_MAKEFILE) ENDIF(CMAKE_VERBOSE_MAKEFILE) # create a shared C++ library SET(CMAKE_CXX_CREATE_SHARED_LIBRARY - "<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /dll /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}") + "<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /dll /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <LINK_FLAGS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}") SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) # create a C shared library @@ -40,12 +40,13 @@ SET(CMAKE_CXX_COMPILE_OBJECT SET(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /Fo<OBJECT> /Fd<TARGET_PDB> -c <SOURCE>${CMAKE_END_TEMP_FILE}") - +SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1) SET(CMAKE_C_LINK_EXECUTABLE - "<CMAKE_C_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> /Fd<TARGET_PDB> -link /implib:<TARGET_IMPLIB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") + "<CMAKE_C_COMPILER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> /Fd<TARGET_PDB> -link /implib:<TARGET_IMPLIB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") +SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1) SET(CMAKE_CXX_LINK_EXECUTABLE - "<CMAKE_CXX_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> /Fd<TARGET_PDB> -link /implib:<TARGET_IMPLIB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") + "<CMAKE_CXX_COMPILER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> /Fd<TARGET_PDB> -link /implib:<TARGET_IMPLIB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> -E <SOURCE>${CMAKE_END_TEMP_FILE}") |