-
Notifications
You must be signed in to change notification settings - Fork 165
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
chore: add CMakePresets.json file #1986
Conversation
Signed-off-by: Andrea Terzolo <[email protected]>
I upstreamed these 2 presets because I think they could be widely used, if not, I will keep them locally inside my |
Perf diff from master - unit tests
Perf diff from master - scap file
Heap diff from master - unit tests
Heap diff from master - scap file
|
Now I don't have enough bandwidth but at a certain point we could also use these presets in our CI to avoid duplicates of CMake commands Moreover, there are also build presets that a certain point we could add |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1986 +/- ##
========================================
Coverage 50.98% 50.98%
========================================
Files 310 310
Lines 39612 39612
Branches 17793 17509 -284
========================================
+ Hits 20197 20198 +1
- Misses 14350 14356 +6
+ Partials 5065 5058 -7 ☔ View full report in Codecov by Sentry. |
I believe this is useful. Could other presets be useful? Or merge those first? |
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.
/approve
LGTM label has been added. Git tree hash: f3cde5cb90b88663b71cb2286a7f04603aff25c0
|
I've no other presets to add ATM :/ I think we can add them incrementally if we find something that could be useful |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, incertum The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area build
Does this PR require a change in the driver versions?
No
What this PR does / why we need it:
These days I'm building scap drivers tests over several machines and every time I need to type an infinite cmake to configure them (getting it wrong every time). If you are like me this
CMakePresets.json
file should help you. Configure drivers test should be as simple as:Then to build different targets you should enter the directory created for you by the preset and run the
make
command`cd build-scap-drivers make drivers_test make scap-open make libscap_test ...
Here I provide just 2 presets that I often use while developing, i hope this could be useful to other folks who build libs every day
Which issue(s) this PR fixes:
Special notes for your reviewer:
You can read more on presets usage here https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html
Does this PR introduce a user-facing change?: