-
Notifications
You must be signed in to change notification settings - Fork 160
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
[fix] prebuild set CMAKE_PREFIX_PATH properly #1154
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1154 +/- ##
=======================================
Coverage 83.84% 83.84%
=======================================
Files 57 57
Lines 5992 5993 +1
=======================================
+ Hits 5024 5025 +1
Misses 968 968 ☔ View full report in Codecov by Sentry. |
cmake/AwsPrebuildDependency.cmake
Outdated
else() | ||
list(JOIN CMAKE_PREFIX_PATH ":" PREFIX_PATH_ENV_VAR) | ||
endif() | ||
set(ENV{CMAKE_PREFIX_PATH} ${PREFIX_PATH_ENV_VAR}) |
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.
changing an environment variable seems like trouble
try to find a way to continue passing this as arguments
can do something to convince cmake more strongly that we want to treat this as a string, not a list
cmake/AwsPrebuildDependency.cmake
Outdated
if(WIN32) | ||
list(JOIN CMAKE_PREFIX_PATH ";" PREFIX_PATH_ENV_VAR) | ||
else() | ||
list(JOIN CMAKE_PREFIX_PATH ":" PREFIX_PATH_ENV_VAR) |
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.
list(JOIN) is cmake 3.12+
Co-authored-by: Michael Graeb <[email protected]>
Co-authored-by: Michael Graeb <[email protected]>
Issue #, if available:
After more digging
CMAKE_PREFIX_PATH
CMAKE_PREFIX_PATH
, so theCMAKE_PREFIX_PATH
is now a listCMAKE_PREFIX_PATH
variable into the list of args to call for Cmakeexecute_process
, it seems like based on the version of CMAKE, cmake sometimes confuses about those values. And treat the second value in theCMAKE_PREFIX_PATH
list as a separate args for cmake to take.-DCMAKE_PREFIX_PATH=/root/aws-crt-cpp/build/aws-crt-cpp/deps/AWSLC/install/
and/root/aws-crt-cpp/build/install
CMAKE_PREFIX_PATH
properly, and MOST failed.Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.