Skip to content

[cmake] consolidate set_target_properties() calls #6594

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

Merged
merged 3 commits into from
Aug 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
address review feedback
  • Loading branch information
jameslamb committed Aug 15, 2024
commit a9c2ea5b2e01626d00313af5bd133611e690d8ed
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -665,12 +665,19 @@ endif()
if(USE_CUDA)

set_target_properties(
lightgbm_objs _lightgbm
lightgbm_objs
PROPERTIES
CUDA_ARCHITECTURES ${CUDA_ARCHS}
CUDA_SEPARABLE_COMPILATION ON
Copy link
Collaborator

Choose a reason for hiding this comment

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

CUDA_SEPARABLE_COMPILATION was not set for _lightgbm target in previous config.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah! Thank you for catching that, I've updated it in recent commits.

This also led me to question what this property actually does. Here's a simple explanation of it: https://stackoverflow.com/a/50557765/3986677

)

set_target_properties(
_lightgbm
PROPERTIES
CUDA_ARCHITECTURES ${CUDA_ARCHS}
CUDA_RESOLVE_DEVICE_SYMBOLS ON
)

if(BUILD_CLI)
set_target_properties(
lightgbm
Expand Down
Loading