Using local makefile for CLion instead of CMake

后端 未结 6 774
醉酒成梦
醉酒成梦 2020-12-04 04:49

Is there a way to configure CLion to use a local makefile to compile code, rather than CMake? I can\'t seem to find the way to do it from the build options.

6条回答
  •  暖寄归人
    2020-12-04 05:04

    While this is one of the most voted feature requests, there is one plugin available, by Victor Kropp, that adds support to makefiles:

    Makefile support plugin for IntelliJ IDEA

    Install

    You can install directly from the official repository:

    Settings > Plugins > search for makefile > Search in repositories > Install > Restart

    Use

    There are at least three different ways to run:

    1. Right click on a makefile and select Run
    2. Have the makefile open in the editor, put the cursor over one target (anywhere on the line), hit alt + enter, then select make target
    3. Hit ctrl/cmd + shift + F10 on a target (although this one didn't work for me on a mac).

    It opens a pane named Run target with the output.

提交回复
热议问题