Importing a CMake project into Eclipse CDT

前端 未结 6 1431
Happy的楠姐
Happy的楠姐 2021-01-30 16:49

I have a native CMake project, and I want to use the Eclipse IDE with it so that it makes my development easier by providing auto-complete and and other features. I can\'t seem

6条回答
  •  你的背包
    2021-01-30 17:40

    Do the follows:

    mkdir debug (or release, or any other name)

    cd debug
    cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE -DCMAKE_ECLIPSE_MAKE_ARGUMENTS=-j3 -DCMAKE_ECLIPSE_VERSION=4.1 ../
    

    Make sure you set the right Eclipse version

    Then open the folder from Eclipse (Open Projects)

提交回复
热议问题