Refactors generation and usage of CelixTargets cmake files#254
Merged
Refactors generation and usage of CelixTargets cmake files#254
Conversation
Codecov Report
@@ Coverage Diff @@
## master #254 +/- ##
==========================================
+ Coverage 67.83% 68.27% +0.44%
==========================================
Files 127 127
Lines 26375 26894 +519
==========================================
+ Hits 17891 18363 +472
- Misses 8484 8531 +47
Continue to review full report at Codecov.
|
abroekhuis
reviewed
Jun 9, 2020
abroekhuis
approved these changes
Jun 11, 2020
…rted) bundle target.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes how CelixTargets cmake file are generated and used for installs with multiple build types.
Primary so that there is can be a single CelixTargets.cmake entry point.
Tthis is needed to not break how Celix (or projects export Celix bundles) Config.cmake file works.
I ran into the issue that all project using Celix, exporting bundles and providing a Config.cmake are not building any more.
In the refactored setup, there is always a CelixTargets.cmake file and this file includes all config specific CelixTargets-.cmake files.
Also ensure that multiple imported bundle configs can coexists. When creating a container/docker the correct bundle for the config will be resolved. I tried to mimic as much as possible cmake behavior for imported library targets.
This resolving also make use of CMAKE_MAP_IMPORTED_CONFIG_ and target properties MAP_IMPORTED_CONFIG_ (if present)
I ensured that it will always try to resolve to a imported bundle targets even if no imported bundle target exists for the build type and no MAP_IMPORT_CONFIG exists. If I am not sure how CMake handle this for libraries, but this seems logical for me...
I tested this when installed for the CMAKE_BUILD_TYPE Release, Debug and using the celix-example dir (which can be build standalone).