Forum > Options

lazbuild + hints and warnings

(1/1)

Grahame Grieve:
I want to see hints and warnings when I compile my projects in the IDE. but when I build them using lazbuild in a CI build, for example, I just don't want to see them. Is there a way I can see hints and warnings in the IDE but not lazbuild?

dbannon:
What I do Graham, in the IDE, for each project, debug mode has all the warnings displayed, release mode does not. That information is saved in with the project and, normally, when building with Lazbuild, its for release. So, no warnings.

Davo

Grahame Grieve:
Thanks. I'll think about that but the CI build builds debug versions and runs the tests. I don't know whether the tests pass in release build.

Grahame Grieve:
This doesn't work - I'm compiling a build mode with hints and warnings off, and passing -q -q to lazbuild, and still getting all the hints and warnings... so it seems like I can't turn them off?

dbannon:
There are two approaches I use, I am sure there are others that work as well.

Firstly, using lazbuild : while in the IDE, you configure the various modes of your project, for the 'release' ones you turn off all the messages you don't want to see in project options, verbosity and  messages.  Then, when using lazbuild to build a project in that mode, those settings are applied.

Secondly, if you build directly using FPC instead of lazbuild, you pass things like " -vm6058,2005,5027 " to the compiler. Depending on what you are doing, building with FPC directly can get you a lot more flexibility.

Note that the 6058, relating to functions not being inlined does not exist in fpc304 so if you want to build "with any old compiler" your scripts need to check which compiler is being used (fpc -iV). I recently dropped support for fpc304 for just this reason. But mean I could remove a whole lot of ifdefs so not a bad thing.

Davo

Navigation

[0] Message Index

Go to full version