build process on mingw/msys2: force usage of a response file at archive/link stage to avoid truncation of the command line when the list of modules to archive/link is very long (happens for eeschema and pcbnew).
This commit is contained in:
parent
c01a9d0285
commit
d7f4c76682
|
@ -197,16 +197,23 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
||||||
# Since version 2.8.5, Cmake uses a response file (.rsp) to
|
# Since version 2.8.5, Cmake uses a response file (.rsp) to
|
||||||
# pass the list of include paths to gcc
|
# pass the list of include paths to gcc
|
||||||
# unfortunately, under mingw32+msys, at least with gcc 4.8 and previous,
|
# unfortunately, under mingw32+msys, at least with gcc 4.8 and previous,
|
||||||
# this file is not expanded and include paths defined in this file are not taken in account
|
# this file is not always expanded and in this case include paths defined in this file
|
||||||
# this is the case of wxWidgets includes
|
# are not taken in account ( this is the case of wxWidgets includes )
|
||||||
# Disable this response file for includes ( See Windows-GNU.cmake module )
|
# If it is the case, disable this response file for includes ( See Windows-GNU.cmake module )
|
||||||
if( WIN32 AND MSYS AND NOT CMAKE_CROSSCOMPILING )
|
if( false ) #set to true to disable the include response file
|
||||||
# fixme: it is needed only with MSYS+MINGW32? or always under MINGW
|
if( WIN32 AND MSYS AND NOT CMAKE_CROSSCOMPILING )
|
||||||
if( ${CMAKE_SIZEOF_VOID_P} MATCHES 4 )
|
# fixme: it is needed only with MSYS+MINGW32? or always under MINGW
|
||||||
set( CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 0 )
|
if( ${CMAKE_SIZEOF_VOID_P} MATCHES 4 )
|
||||||
|
set( CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 0 )
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# for some reasons, cmake does do use always a response file to send the list of objects
|
||||||
|
# to the archiver, and because this list can be very long, and can create issue
|
||||||
|
# when it is used in a command line, force use of a response file to store it
|
||||||
|
SET( CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1 )
|
||||||
|
|
||||||
# The MinGW compiler can use the microsoft system snprintf as standard and it has a broken
|
# The MinGW compiler can use the microsoft system snprintf as standard and it has a broken
|
||||||
# API with respect to the C99 standard, so make sure we force it to use its own compliant
|
# API with respect to the C99 standard, so make sure we force it to use its own compliant
|
||||||
# snprintf
|
# snprintf
|
||||||
|
|
Loading…
Reference in New Issue