How to configure Eclipse CDT for cmake?

后端 未结 7 1305
生来不讨喜
生来不讨喜 2020-11-30 22:30

How to configure Eclipse \"Helios\" with plugin CDT for cmake?

cmake all 
CMake Error: The source directory \"D:/javaworkspace/workspace/Planner/Debug/all\"          


        
7条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-30 23:17

    Whatever method I have used the external includes has not been indexed.

    This is because CMAKE used the "response files" which hides all includes inside those files, instead use it directly (-IPATH_TO_SOME_DIR)

    To disable the "response file" I have used following commands:

    SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES NO)
    SET(CMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES NO)
    

    To force the CMAKE to show gcc/g++ execution I have modified the make build target to "all VERBOSE=1". Note that this is not needed when you are using cmake4eclipse.

    I have eclipse in version 2018-12 (4.10.0) with CDT in version 9.6.

提交回复
热议问题