Registered Member
|
Hello, I'm trying to use KDevelop 5 for my project which has hierarchical CMake build system.
I have trouble with KDevelop 5's background parser now. I used include_directories() in child CMakeLists.txt and it was compiled without any errors. However, I still have lots of "Problems in Semantic analisys" with red underlines. When I created another simple and small project with similar structure for a test, there was no "Problems in semantic analisys" and Now I know kdevelop5 parses child cmakelists.txt for adding include directories. So I'd like to know what is different between my original project and simple test project. Is there any way to debug "background parser"'s parsing results including "include directories"? |
Global Moderator
|
Does your project use the CMake project manager? Querying the include directories from cmake only works with that. You select the project manager when opening the project for the first time.
I'm working on the KDevelop IDE.
|
Registered Member
|
Thanks for your reply.
I'm not sure which project manager were selected because I'm migrating from kdevelop4 to kdevelop5 now. Maybe the project file(.kdev4) coulde be generated from kdevelop4 and I imported it on Kdevelop5. I'll open the project and select right project manager later and report the result to this thread. Thank you again! |
Registered Member
|
I think I found out why kdevelop couldn't parse correctly.
Because my cmake build structure is designed to include sub projects optionally as shown below, If kdevelop parse only cmakelists.txt without cache remember which sub projects selected, this problem will be occured.
As a test, I added sub directories explicitly then all red underlines were gone. So my questions are .. Does kdevelop use the cache when it parses cmakelists.txt? If not, is there any solution or trick for parsing implicitly added sub directories? |
Global Moderator
|
KDevelop should query these things from CMake. Did you configure your actual build directory as the build directory in KDevelop? Then it should also use the same configuration.
We don't really parse (at least not for this purpose) CMakeLists.txt any more.
I'm working on the KDevelop IDE.
|
Registered Member
|
Ok..
When does kdevelop query these things? when build button clicked or project loaded or background parser worked? KDevelop may not know when I triggered "build" because I type "make" in the console. |
Global Moderator
|
As soon as cmake (re)configures the project, as far as I'm aware. This is kind of independent of building it, configure and build are two separate steps. Does it work now?
I'm working on the KDevelop IDE.
|
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]