mitsuba-renderer / mitsuba3

Mitsuba 3: A Retargetable Forward and Inverse Renderer
https://www.mitsuba-renderer.org/
Other
2.1k stars 246 forks source link

CMake stubs: Change post-process command dependency to target-level #1317

Closed rtabbara closed 1 month ago

rtabbara commented 1 month ago

Motivated by flaky Windows CI, where we appear to be generating stubs twice, in some instances resulting in a race condition.

After stub generation through nanobind, we perform an additional custom command to regex variant specific types to auto. e.g. dr.llvm.ad.Float -> dr.auto.ad.Float. Change the cmake custom command dependency from the output .pyi file to the corresponding stub-gen target that gets created in nanobind_add_stub to ensure correct execution ordering.

rtabbara commented 1 month ago

Looking at the Windows CI build, it appears that indeed the Mitsuba *.pyi files are now only generated once