sofa icon indicating copy to clipboard operation
sofa copied to clipboard

[CMake] FIX parent modules library consistency

Open guparan opened this issue 3 years ago • 0 comments

Parent modules must always interface the same libraries. e.g. Sofa.Component.dll must always be the same

Thus, if some of its child modules are disabled, parent module will not generate a library.

This PR creates and uses a new macro sofa_add_subdirectory_modules. This macro is meant for parent modules to easily add their child modules and sets a variable with all added targets. If a child module is missing or disabled, a message will be shown (not an error) and the library will not be created.


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

guparan avatar Aug 17 '22 14:08 guparan