Can I create additional axes/dimensions in Premake? -
premake 5 gives 2 functions separate independent configuration variables in projects: configurations
, platforms
. example, might have:
configurations { "debug", "release" } platform { "windows", "linux" }
the documentation refers these axes, way describe them, since can have independent settings each axis:
really, platforms set of build configuration names, providing axis on configure project.
but if want axis? example, data types used particular calculations:
calctypes { "long", "default", "short" }
can create new axis, , if so, how?
i think tags (a new feature due released in next alpha build) might you're looking for. here example pull request implemented:
workspace 'foobar' configurations { 'release-std', 'debug-std', 'release-blz', 'debug-blz' } filter { 'configuration:*-std' } tags { 'use-std' } filter { 'configuration:*-blz' } tags { 'use-blz' } project 'test' filter { 'tags:use-blz' } includedependencies { 'blz' } defines { 'use_blz' } filter { 'tags:use-std' } defines { 'use_std' }
update: if see how add custom fields (e.g. defines
, configurations
, etc.), have @ api.register()
calls in _premake_init.lua. see how enable filtering on 1 of these fields, have @ pull request.
while adding new fields trivial , can done anywhere, need work before simple enable fields filtering.
Comments
Post a Comment