Cmake command line too long windows

前端 未结 1 411
迷失自我
迷失自我 2021-02-09 03:59

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

相关标签:
1条回答
  • 2021-02-09 04:36

    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 "")
    
    0 讨论(0)
提交回复
热议问题