Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Invalidating discovered scanner info after build settings have changed

In our IDE we need to update list of defines when user changes compiler settings. I.e. we have a target architecture macro that needs to contain proper version depending on compiler settings.

I created custom ScannerInfoProvider and ConsoleParser that properly invoke our tools to gather include paths and defines. I verified that the arrays they pass to IScannerInfoCollector are proper ones. I verified that if I quit the IDE, delete ${workspace}/.metadata/.plugin/org.eclipse.cdt.make.core/${project}.sc file the new macro values are proper.
The extension point uses CDT stock org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector that gathers the scanner information.

The problem I see is that new values do not replace the previous list but instead get merged together - i.e. our __ARCH__ macro now is marked as having two active values. Is there a way to override symbols instead of merging with them? Can I reuse PerProjectSICollector (it does the merge in definedSymbolsNeedUpdate) or the only way is to create our own?

Best regards,
Eugene

Back to the top