diff --git a/CMakeLists.txt b/CMakeLists.txt index f478bc271a..1c3d9f3a74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 # pass the list of include paths to gcc # 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 is the case of wxWidgets includes - # Disable this response file for includes ( See Windows-GNU.cmake module ) - if( WIN32 AND MSYS AND NOT CMAKE_CROSSCOMPILING ) - # fixme: it is needed only with MSYS+MINGW32? or always under MINGW - if( ${CMAKE_SIZEOF_VOID_P} MATCHES 4 ) - set( CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 0 ) + # this file is not always expanded and in this case include paths defined in this file + # are not taken in account ( this is the case of wxWidgets includes ) + # If it is the case, disable this response file for includes ( See Windows-GNU.cmake module ) + if( false ) #set to true to disable the include response file + if( WIN32 AND MSYS AND NOT CMAKE_CROSSCOMPILING ) + # fixme: it is needed only with MSYS+MINGW32? or always under MINGW + if( ${CMAKE_SIZEOF_VOID_P} MATCHES 4 ) + set( CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 0 ) + 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 # API with respect to the C99 standard, so make sure we force it to use its own compliant # snprintf