Skip to content
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

Forward CMake variables to prebuilding dependencies #1161

Merged
merged 31 commits into from
Nov 26, 2024
Merged

Conversation

sfod
Copy link
Contributor

@sfod sfod commented Oct 23, 2024

Issue #, if available:

When prebuilding dependencies, we need to pass certain CMake variables from parent cmake process to child cmake process (e.g. toolchain file or path to C compiler). CMake doesn't provide this functionality out of the box.

Description of changes:

This PR implements a new CMake function that checks CMake cache file and collects variables that may affect build process. aws_prebuild_dependency uses this new function, so no changes are required in the downstream projects.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.63%. Comparing base (252e8c2) to head (8f8067c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1161   +/-   ##
=======================================
  Coverage   83.63%   83.63%           
=======================================
  Files          57       57           
  Lines        5953     5953           
=======================================
  Hits         4979     4979           
  Misses        974      974           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sfod sfod changed the title Add CMake function to gather cmd arguments Pass CMake command line variables to prebuilding dependencies Nov 8, 2024
@sfod sfod changed the title Pass CMake command line variables to prebuilding dependencies Forward CMake variables to prebuilding dependencies Nov 13, 2024
Copy link
Contributor

@graebm graebm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking pretty good.
There might be a few more things we should look into (mentioned in comments), but when you're happy with it, I'm happy with it.

cmake/AwsPrebuildDependency.cmake Outdated Show resolved Hide resolved
cmake/AwsPrebuildDependency.cmake Outdated Show resolved Hide resolved
cmake/AwsPrebuildDependency.cmake Show resolved Hide resolved
cmake/AwsPrebuildDependency.cmake Show resolved Hide resolved
cmake/AwsPrebuildDependency.cmake Outdated Show resolved Hide resolved
@sfod sfod merged commit 4f3c2ee into main Nov 26, 2024
56 checks passed
@sfod sfod deleted the add-cmake-cmd-args branch November 26, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants