Page MenuHome

CMake: Fix bf_editor_space_clip build issue
AbandonedPublic

Authored by Ray Molenkamp (LazyDodo) on Jan 13 2022, 4:48 PM.

Details

Summary

bf_editor_space_clip may build before bf_dna
leading to some header files it requires not
being there yet.


Repro is a little tricky, but here's the steps

  1. Have a virgin build folder, no make clean will not do it, it has to be brand new
  2. run make bf_editor_space_clip
  3. Build error since dna_type_offset.h does not exist yet.

adding BF_dna to the LIB section does not solve the problem,
why not? since we link all dep targets as INTERFACE which means
if you link me, you're gonna need these things... but i don't..

so even if you add BF_dna as a dependency in LIB the build system
is free to build BF_dna and BF_Editor_space_clip in any order it
desires as long as both build outputs are available when a
downstream target links them.

D12122 should offer relief here by allowing dependencies to be
expressed in proper terms, in the mean time, this ugly hack
will have to suffice.

unsure how many other sub projects are troubled by this, but people
reported issues with bf_editor_space_clip on chat.. we may have
to deal with these on an individual basis as they pop up..

yeah... I'm not thrilled about this either..

Diff Detail

Repository
rB Blender
Branch
tmp_dna_header_fix (branched from master)
Build Status
Buildable 19969
Build 19969: arc lint + arc unit

Event Timeline

Ray Molenkamp (LazyDodo) requested review of this revision.Jan 13 2022, 4:48 PM
Ray Molenkamp (LazyDodo) created this revision.

@Sergey Sharybin (sergey) landed a fix, situation is still bad though, we should do better here.