From my understanding of cmake, the tool takes care of file path and command lines length to avoid reaching windows limitation of 8191 characters.
However I\'m cross com
Turning my comment into an answer
I had the same problem with the command line length and could solve it with adding the following "use response file" settings to my toolchain file:
SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
SET(CMAKE_C_RESPONSE_FILE_LINK_FLAG "@")
SET(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@")
And if you would have had used ninja
you would need an additional:
SET(CMAKE_NINJA_FORCE_RESPONSE_FILE 1 CACHE INTERNAL "")