Skip to main content
YDann.7
Associate III
February 24, 2021
Solved

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

  • February 24, 2021
  • 3 replies
  • 1678 views

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.
Best answer by Ozone

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
February 24, 2021

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
February 24, 2021

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
February 24, 2021

Thanks

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

And it seems to work.