Gepetto / gepetto-viewer

Graphical Interface for Pinocchio and HPP.
BSD 2-Clause "Simplified" License
40 stars 30 forks source link

OSX: need GLDEBUGPROC to be define before any other Qt import #201

Closed ymontmarin closed 1 year ago

ymontmarin commented 1 year ago

It was undone with the "format" commit, but for OSX, we need to define GLDEBUGPROC before any other Qt import. This is done gepetto/gui/fwd.hh, so the include of this file must be the first in every gui folder files that import it.

ymontmarin commented 1 year ago

OK, so pre-commit is exatly undoing the fix needed.. Either we can in some way use a flag to ignore pre-commit for this, or we have to redefine GLDEBUGPROC as it is done in gepetto/gui/fwd.hh in every file where it is needed. Or we can use another file to include save where pre-commit will allow the include to be the first one.

ymontmarin commented 1 year ago

Here is the commit before pre-commit undo it: https://github.com/Gepetto/gepetto-viewer/pull/201/commits/01e6dd9c77ea4df0a46beebcd3903fb1ba07b9df

This GLDEBUGPROC is needed for OSX build

nim65s commented 1 year ago

You can add a comment between 2 includes to ensure linters won't change order. This comment will also tell humans reading the code that this order is important and shouldn't be changed.

nim65s commented 1 year ago

Thanks