Skip to main content
YDann.7
Associate III
Feb 24, 2021 7:55 AM UTC
Solved

[STM32CubeIDE] Is there a way to override compilation warnings of the project properties ?

Dear,

Is there a way to override compilation warnings of the project properties ?

I enable the "-Wall" and "-Wextra" options in the project properties. But it is global for the project and I have the warning for my specific files (.cpp / .hpp) and the ST library files (.c / .h).

I only want to have the warning for my specific files. Is there a way to do that in the properties with the gcc options without adding pragma or options in the code files ?

This topic has been closed for replies.
Ozone
OzoneBest answer
Principal
Feb 24, 2021 9:16 AM UTC

Such properties are usually handled in a hierarchical way in Eclipse.

Settings defined for one element (e.g. project or folder) automatically apply to subordinate elements (like individual files) - unless explicitly overridden.

3 replies

Ozone
Principal
Feb 24, 2021 9:13 AM UTC

I don't use CubeIDE, but as a Eclipse-based system, I expect it to be handled the usual way.

Yust right-click on the source file in the "Project Explorer" view, select "Properties", and adapt the build settings there.

Ozone
OzoneBest answer
Principal
Feb 24, 2021 9:16 AM UTC

Such properties are usually handled in a hierarchical way in Eclipse.

Settings defined for one element (e.g. project or folder) automatically apply to subordinate elements (like individual files) - unless explicitly overridden.

YDann.7
YDann.7Author
Associate III
Feb 24, 2021 10:13 AM UTC

Thanks

I never see this possibility to set properties for specific folder.

And it seems to work.