How to configure Eclipse CDT for cmake?

后端 未结 7 1322
生来不讨喜
生来不讨喜 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:00

    Another completely different method.

    • Manually create an empty Eclipse project.

    • Link source directory via Project Properties -> C/C++ General -> Paths and Symbols -> Source Location.

    • In the Debug and Release build directories create 'Make Targets' (using the 'Make Targets View'). Leave 'Make Target' field empty and set the 'command' field to cmake -G "Unix Makefiles" .

    • When you double-click on the 'Make Target' that you've created, it should trigger cmake invocation inside the Debug/Release dirs.

    • In 'Project Properties -> C/C++ Build' disable built-in makefile generator.

    Now normal build should work. It will also pick up any changes in the CMakeLists.txt files (to the extent that CMake can).

    Maybe a more detailed description: https://stackoverflow.com/a/38140914/4742108

提交回复
热议问题