CMAKE_TOOLCHAIN_FILE was not used by the project

后端 未结 4 2098
醉话见心
醉话见心 2020-12-15 02:46

Cmake gives this warning when building one third-party script:

CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_TOOLCHA         


        
4条回答
  •  长情又很酷
    2020-12-15 03:01

    In case you get this message with CLion after you set the -DCMAKE_TOOLCHAIN_FILE=xxx option, you'll want to delete all the CMake build directories.

    Do

    Tools-> CMake -> Show Generated CMake Files in File Manager
    

    then delete all build directories. Then do

    Tools-> CMake -> Reload the CMake Project
    

    Once you do this, you will still get the warning, but at least it will be observed the first time cmake is run.

提交回复
热议问题