0

after setting up KDevelop under Kubuntu 19.10 with CMake, the following error occurs whenever I open a project:

Failed to configure the project (error message: Configuration failed.).

As a result, KDevelop's code understanding will likely be broken. To fix this issue, please ensure that the project's CMakeLists.txt files are correct, and KDevelop is configured to use the correct CMake version and settings. Then right-click the project item in the projects tool view and click 'Reload'.*

If I ignore the message, I can compile my project without any issues, the CMakeLists.txt is set up correctly. I have no idea where to solve this error, I haven't found anything for this specific case on google.

EDIT: Additional information

KDevelop Version: 5.4.2

CMake Version: 3.13.4

Upon creating a new KDevelop project, I create "new from template", choose the KDevelop Category and the standard "Simple KDevelop Plugin" as project type. After creation, it instantly prompts me with said error.

In the picture below, you can see the CMake configuration for the newly added project.

CMake project config

A.Najafi
  • 691
  • 1
  • 9
  • 20
blaargh
  • 33
  • 1
  • 10
  • Can you please create a simple [mcve] project which replicates this behavior and show it to us? And what version of KDevelop are you using? What version of CMake? – Some programmer dude Oct 31 '19 at 08:06
  • And if you create a new project from inside KDevelop itself, does it report the same warning when you later close and reopen the project? If not, what are the differences between such a simple project and one that you made yourself that causes the warning? – Some programmer dude Oct 31 '19 at 08:07
  • 1
    I added more information in the post. Creating a new project from inside KDevelop produces the same error when I close and reopen it. I – blaargh Oct 31 '19 at 08:16
  • 2
    If you really want to make a new KDevelop plugin, you need the kdevplatform headers. Those should be in the `kdevplatform-dev` package. For regular development you probably do not need those. – Botje Oct 31 '19 at 08:18
  • Lol, thanks. I dont want to make a new KDevelop plugin, I just chose that option because it defaulted me into it. Well, choosing the "standard" category for a simple cmake c++ project does not produce any errors. Thank you for pointing out that obvious mistake! – blaargh Oct 31 '19 at 08:24

1 Answers1

0

Make sure you have: base-devel extra-cmake-modules

To install: apt install extra-cmake-modules If that doesn't work, you might need to add some repos. Check this discussion

Explanation:

I had a similar problem and got:

Failed to configure project 'me_first_proj' (error message: Exit code 1). As a result, KDevelop's code understanding will likely be broken.

Inside CMakeLists.txt I found it looking for $ECM_MODULE_PATH which turned out to be empty. This, was related to extra-cmake-modules which I didn't have.

For Arch: pacman -Syu extra-cmake-modules The name might differ for your distro.

I already had base-devel but required ECM

Ulterno
  • 3
  • 1
  • 3