I'm "maintaining" a small addon used to add support for Qt (https://github.com/dcourtois/premake-qt/)
In this addon, I'm overriding a few Premake functions to scan project files, add generated ones, and setup their build commands. It works fine for most actions, but the custom build commands are completely ignored by the gmake2 one.
This line "loses" the buildOutputs in the case of build commands added by my addon: if I print the number of buildOutputs of filecfg, it shows 1, but on shadowContext, it's 0.
Thing is if I add a custom rule in my project (using the usual filter and buildcommands, etc.) then shadowContext still retain the buildOutputs.
I'm rusty in Lua and Premake and my Decoda stopped working for some reason, so I'm having a bit of trouble to understand if the issue is a bug in gmake2 or in my addon, and I'm not sure how to fix this.
I'm "maintaining" a small addon used to add support for Qt (https://github.com/dcourtois/premake-qt/) In this addon, I'm overriding a few Premake functions to scan project files, add generated ones, and setup their build commands. It works fine for most actions, but the custom build commands are completely ignored by the gmake2 one.
I've narrowed down the problem to this line: https://github.com/premake/premake-core/blob/ea2971dd50d048582d646d12d9e50253f6f6731c/modules/gmake2/gmake2_cpp.lua#L178
This line "loses" the
buildOutputs
in the case of build commands added by my addon: if I print the number ofbuildOutputs
offilecfg
, it shows 1, but onshadowContext
, it's 0. Thing is if I add a custom rule in my project (using the usualfilter
andbuildcommands
, etc.) thenshadowContext
still retain thebuildOutputs
.I'm rusty in Lua and Premake and my Decoda stopped working for some reason, so I'm having a bit of trouble to understand if the issue is a bug in gmake2 or in my addon, and I'm not sure how to fix this.
For reference, here is how my addon adds custom build rules: https://github.com/dcourtois/premake-qt/blob/a79003c5ae2589a1d6ea84838d92ca30116ad4b2/qt.lua#L470 And the generated files are added directly to the list of files in my override of
premake.oven.bakeFiles
: https://github.com/dcourtois/premake-qt/blob/a79003c5ae2589a1d6ea84838d92ca30116ad4b2/qt.lua#L337Any help, pointer, etc. appreciated!