Skip to content

[SofaFramework] Add tests on aliases for "multiple projects" out-of-tree build#2566

Merged
guparan merged 2 commits intosofa-framework:masterfrom
fredroy:fix_outoftree_multipleproj
Jan 3, 2022
Merged

[SofaFramework] Add tests on aliases for "multiple projects" out-of-tree build#2566
guparan merged 2 commits intosofa-framework:masterfrom
fredroy:fix_outoftree_multipleproj

Conversation

@fredroy
Copy link
Contributor

@fredroy fredroy commented Dec 31, 2021

While making out-of-tree builds with SofaGLFW, which entrypoint is a a cmakelists with two add_sofa_something(), cmake is throwing this kind of error while reading the second project:

CMake Error at C:/Work/sofa/install/master_fredroy/lib/cmake/Sofa.DefaultType/Sofa.DefaultTypeConfig.cmake:44 (set_target_properties):
  Attempt to promote imported target "Sofa.DefaultType" to global scope (by
  setting IMPORTED_GLOBAL) which is not built in this directory.

which appears (after some headaches) to be linked with the fact that the Sofa.DefaultTypeConfig is read twice and cmake tries to set a flag (imported global) on something which has already the flag, and more generally to do twice the job of aliasing.

So this PR adds a test on the four "legacy" SofaFramework targets to only make aliases if it was not done before.

And for good measure, update the date for the removal of the aliases to v22.06


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).

@fredroy fredroy added pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request pr: backport todo This PR will be backported into the release preceeding its milestone. labels Dec 31, 2021
@fredroy fredroy requested a review from guparan December 31, 2021 09:16
@guparan guparan merged commit 2fc5c46 into sofa-framework:master Jan 3, 2022
@guparan guparan added pr: status ready Approved a pull-request, ready to be squashed pr: fast merge Minor change that can be merged without waiting for the 7 review days and removed pr: status to review To notify reviewers to review this pull-request labels Jan 3, 2022
@fredroy fredroy deleted the fix_outoftree_multipleproj branch January 3, 2022 13:29
@guparan guparan removed the pr: backport todo This PR will be backported into the release preceeding its milestone. label Jun 23, 2022
@guparan guparan added this to the v22.06 milestone Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: fix Fix a bug pr: status ready Approved a pull-request, ready to be squashed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants