parser and target_properties COMPILE_FLAGS ... -include foo.h ... (MuseScore: Does this project parse correctly for you?)

Aleix Pol aleixpol at kde.org
Sat May 25 16:17:47 BST 2019


On Sat, May 25, 2019 at 9:59 AM René J.V. Bertin <rjvbertin at gmail.com> wrote:
>
> On Wednesday May 22 2019 14:21:42 René J.V. Bertin wrote:
>
> >Am I doing something wrong or can someone reproduce the issue (= is this a bug in KDevelop)?
>
> Is the parser guaranteed to pick up includes added this way?
>
> ```
>   set_target_properties(inspectorplugin
>       PROPERTIES
>       COMPILE_FLAGS
>          "-fPIC -D_GNU_SOURCE -D_REENTRANT -DHAVE_CONFIG_H -DQT_PLUGIN -DQT_SVG_LIB -DQT_SHARED -DQT_NO_DEBUG -include ${PROJECT_SOURCE_DIR}/all.h"
>       )
> ```
>
> R.

Passing includes as compile flags is the kind of thing that can break
stuff, yes.
We are still passing the rest as CMakeManager::extraArguments, maybe
libclang doesn't include it.

Aleix

Aleix


More information about the KDevelop-devel mailing list