c++cmakekdevelop

KDevelop runs the wrong CMake


I have two CMake versions installed: one in /usr/bin/, the latest one in /opt/.

From the command line I can specify the latest version, and the C++17 code is compiled successfully.

From KDevelop, after setting the default CMake executable to /opt/cmake, the old version is still executed.

Is there anything else to set in KDevelop to let it find the new version?

Do I have to deal with KDevelop's plugins?

System:
Linux (Debian), KDevelop 5.2.1, CMake 3.7, CMake 3.10.2, Ninja


Solution

  • You can set the path to the CMake executable in both the global settings and the projects settings. Obviously new projects inherit the global setting but existing projects stick to their individual CMake path, even when the global setting is changed.

    To change the project-specific CMake executable:

    1. open the project settings
    2. go to CMake tab
    3. click on "Show Advanced"
    4. change the "CMake executable" at the bottom