-
Notifications
You must be signed in to change notification settings - Fork 47
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
Use @loader_path instead of $ORIGIN on MacOS #403
Changes from 1 commit
94d2700
05c3d37
89fb8a3
163bb58
2cf5240
8dfa21c
96bc14f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,14 +72,19 @@ function(rapids_cython_add_rpath_entries) | |
list(APPEND cleaned_paths "${path}") | ||
endforeach() | ||
|
||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||
set(platform_rpath_origin "\$ORIGIN") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this supposed to be escaped? ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to escape $ORIGIN with CMake 3.16+ |
||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||
set(platform_rpath_origin "@loader_path") | ||
endif () | ||
get_property(targets GLOBAL PROPERTY "rapids_cython_associations_${_RAPIDS_CYTHON_TARGET}") | ||
foreach(target IN LISTS targets) | ||
# Compute the path relative to the current target. | ||
set(target_paths) | ||
get_target_property(target_source_dir ${target} SOURCE_DIR) | ||
foreach(target_path IN LISTS cleaned_paths) | ||
cmake_path(RELATIVE_PATH target_path BASE_DIRECTORY "${target_source_dir}") | ||
list(APPEND target_paths "$ORIGIN/${target_path}") | ||
list(APPEND target_paths "${platform_rpath_origin}/${target_path}") | ||
endforeach() | ||
list(JOIN target_paths ";" target_paths) | ||
|
||
|
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.
Could we make this
@loader_path
behavior specific to Darwin and use$ORIGIN
in an "else"? I'd like to avoid the string check for"Linux"
as a defensive behavior.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.
I agree, we should explicit check for Darwin and otherwise use $ORIGIN