Enable tint command build with CMake #38
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The initial motivation for this contribution is to build and share the
tintCLI in the GitHub Action workflow.In theory enabling CMake options
TINT_BUILD_CMD_TOOLSandTINT_ENABLE_INSTALLindawn-ci.cmakeshould have been enough, but I had to fix a few things:tint_add_targetdid not addINSTALLrules for targets of typecmd. It is now the case, through the newtint_cmd_compile_optionsthat follows the same pattern than for other target types.TINT_BUILD_HLSL_WRITERis OFF (which happens for instance on macOS -- example of problematic run). I add here the missingBUILD.cfgfiles and run the gen script to adapt allBUILD.cmakeetc filesFuture prospects:
TINT_ENABLE_INSTALLto get the executable CLI also adds all static libs from tint, which makes the resulting precompiled artifacts heavier.cmake installtwice with different cocktails of options, so that we provide both a minimal and a full precompiled artifact in releases.