Allow selection of subdirectory-scoped 'all' targets when using Makefiles - #48
Open
cresswellp wants to merge 2 commits into
Open
Allow selection of subdirectory-scoped 'all' targets when using Makefiles#48cresswellp wants to merge 2 commits into
cresswellp wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #48 +/- ##
===========================================
+ Coverage 49.20% 49.35% +0.14%
===========================================
Files 51 51
Lines 10385 10409 +24
===========================================
+ Hits 5110 5137 +27
+ Misses 5275 5272 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Description
CMake gives each new
add_subdirectory()call its ownalltarget, for building everything in that scope. When using the Ninja generator we can select these targets as--target=foo/all(foo/bar/all, etc.), but when using Makefiles they're defined in CMakeFiles/Makefile2 and not visible to ecbundle. This change adds the relevant Makefile2 targets to the command list, so they can be selected with either generator. Other types of recursive targets (/clean,/installetc.) remain hidden.Note that Makefile2 targets don't come with the same
[XX%]progress counter that Makefile targets do, as they lack the necessarycmake_progress_startinfrastructure. We could fake this within ecbundle itself, but it'd either be progress against the whole build which isn't especially useful (e.g. it'd stop at 20% instead of 100%), or else we can try to set up counters per subproject, but then it's not clear what's being measured if targets spanning multiple subprojects are selected. So I've left this as is (no counter).A new helper function is used to streamline the new tests, so the existing build tests have been updated to use it too.
Contributor Declaration
By opening this pull request, I affirm the following: