-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor celix_container_bundles_dir to use add_custom_target #594
Refactor celix_container_bundles_dir to use add_custom_target #594
Conversation
Codecov Report
@@ Coverage Diff @@
## master #594 +/- ##
==========================================
- Coverage 79.00% 78.48% -0.52%
==========================================
Files 234 234
Lines 35386 35386
==========================================
- Hits 27955 27772 -183
- Misses 7431 7614 +183 see 8 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
We have already done this timestamp thing several times successfully in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It's nice to support ninja build and to have container use latest bundles.
We can investigate further optimization later.
An issue is created for this optimization.
Note that Conan use Unix Makefile by default.
One non-intrusive way (without changing conanfile.py) of using ninja is to set environment variable CONAN_CMAKE_GENERATOR=Ninja
.
I agree, I would like to test if this broke with a newer cmake. But for now a fix with custom targets is IMO good enough. |
This PR addresses an issue where changes to bundle zip files were not being copied to the "bundles" directory in the container.
The process of copying updated bundles to a container "bundles" dir appears to have broken at some point. Unfortunately, I couldn't trace back the specific change that introduced this issue using git blame.
Originally, the copying of bundles was tracked with a timestamp file, in combination with a CMake
add_custom_command
. However, attempts to resolve the problem with the add_custom_command proved unsuccessful, leading me to replace it withadd_custom_target
.In my opinion, a custom target is less than ideal, as a custom target dependency always triggers whenever a target is built. A comparison of the time to run
make -j
when nothing has changed demonstrated that on my systems, it took twice as long (albeit still under 1 second).An upside is that the current change seems to fix the usage CMake -> Ninja, which I previously had issues with.
Building with
ninja
, compared tomake -j
, is significantly faster.In conclusion, despite its drawbacks, I believe this update is necessary for now to resolve the issue. Possibly in the future, we can revert to using add_custom_command instead of add_custom_target.