cmake in Flathub kdevelop

Igor Kushnir igorkuo at gmail.com
Wed May 24 18:38:57 BST 2023


On 2023-05-10 04:03, roundup976 at tutanota.com wrote:
> Hello,
> 
> I work in a large CMake project with 900+ executables, 6 million + lines of code and a bunch of other misc. stuff.  I have been using for the last 18 months the KDevelop appimage of version 5.6.1 successfully.  I use a specific cmake version located at /usr/local/bin/cmake.  No issues with the appimage.
> 
> When I try to use the latest Flatpak version 5.11 it will not use my cmake version.  I changed it in both the global location under settings -> configure kdevelop -> cmake as well as project -> configure project -> cmake -> show advanced -> cmake executable.  The project setting will not keep the executable I point to.  It always defaults back to /app/bin/cmake.
> 
> I do not use kdevelop to build, but when the build configuration fails due to cmake errors the project is not parsed and there fore kdevelops code understanding is broken.  This essentially defeats the purpose of an IDE as I am sure you are aware.
> 
> Is there anything I can do to make this work?  Anything I can do to help if it is an issue?  I use neovim when not in kdevelop, and do not want to use vscode.
> 
> My OS is oracle linux 8 on the 5.4 linux kernel using the gnome desktop.
> 
> Thank You,
> 
> Ryan

Hi Ryan,

Searching for "cmake" (with quotes) in KDevelop source code turned up two 
relevant results:
1. In cmakeutils.cpp:
     auto cmake = QStandardPaths::findExecutable(QStringLiteral("cmake"));
2. In usebuilder.cpp:
     QStringList ids = CMake::executeProcess(QStringLiteral("cmake"), 
QStringList(QStringLiteral("--help-command-list"))).split(QLatin1Char('\n'));

 From (2) the "cmake" program is passed to QProcess::start(const QString 
&program, const QStringList &arguments, QIODevice::OpenMode mode = ReadWrite)

In both cases the order of paths in the PATH environment variable should 
determine which executable is picked. So check the value of, then override PATH 
somehow. How to do that is a Flatpak, not KDevelop question.

Cheers,
Igor


More information about the KDevelop-devel mailing list