Bug 400205

Summary: Recheck influence of conditional compilation on syntax colouring and code navigation
Product: [Applications] kdevelop Reporter: Markus Elfring <Markus.Elfring>
Component: Language Support: CPP (Clang-based)Assignee: kdevelop-bugs-null
Status: REOPENED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.2.4   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Markus Elfring 2018-10-23 15:07:23 UTC
I have successfully compiled C++ source files for a specific program. It should work then in the way it was designed.

But I find that I can get a questionable impression from the display by the application “KDevelop 5.2.4-44.1” for source code which is using preprocessor symbols also for some conditional compilation as usual.

#ifdef USE_…
   …
#else
   …
#endif


The complete syntax colouring seems to work only for the else branch in my software build configuration.
Code comprehension windows are also displayed for identifiers in this branch.

But I configured the build parameters in the way that the other branch should be active at the moment. Now I miss the nice background information display in this source code area when I position the mouse pointer there.
Comment 1 Kevin Funk 2018-10-23 15:40:54 UTC
Where did you configure the build parameters? What build system are you using? KDevelop is likely just not "seeing" the custom -DUSE_... params.

Needs more info.
Comment 2 Markus Elfring 2018-10-23 15:55:47 UTC
(In reply to Kevin Funk from comment #1)

I am using the setting “-g -DUSE_…” for the build variable “CMAKE_CXX_FLAGS_DEBUG” for another software evolution at the moment.
Comment 3 Markus Elfring 2018-10-25 12:41:56 UTC
(In reply to Kevin Funk from comment #1)

Would a reload of the selected project be sufficient for the activation of changed software build parameters?

Does the development environment monitor any corresponding configuration files?