Can I skip cmake compiler tests or avoid “error: unrecognized option '-rdynamic'”

前端 未结 5 1495
[愿得一人]
[愿得一人] 2021-02-02 08:11

compilation options for cmake (on windows) for ARM target system but when I run configure it\'s starting compiler tests:

CMake Error at D:/Program Files/CMake 2.         


        
5条回答
  •  太阳男子
    2021-02-02 08:36

    You can skip the compiler checks by adding NONE to your project call:

    project( NONE)
    

    but this can have pretty far-reaching effects. For full details, run

    cmake --help-command project
    

    I'm not familiar with ARM, so this is probably not your best option here. I guess you'd be better to see if there's a way to fix the -rdynamic flag.

    EDIT:

    It looks like this was identified as a bug which is effectively still unresolved. The comments in the bug report mention adding the following lines as a workaround (presumably before your project call):

    set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
    set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
    

提交回复
热议问题