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

[cmake] [swig] use CMake's built-in file-copying mechanisms instead of 'cp' #6259

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

jameslamb
Copy link
Collaborator

As described in #5972, the use of COMMAND cp in this project's CMake code leads to errors when the project is built in environments where cp is not available (for example, the Windows CMD shell by default).

This proposes replacing all of those uses with COMMAND cmake -e copy_if_different, so that cp isn't strictly required to build LightGBM.

-E
copy_if_different
"${PROJECT_SOURCE_DIR}/Release/lib_lightgbm_swig.dll"
com/microsoft/ml/lightgbm/windows/x86_64
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jameslamb jameslamb changed the title WIP: [cmake] [swig] use CMake's built-in file-copying mechanisms instead of 'cp' [cmake] [swig] use CMake's built-in file-copying mechanisms instead of 'cp' Jan 8, 2024
@jameslamb jameslamb marked this pull request as ready for review January 8, 2024 04:59
@jameslamb
Copy link
Collaborator Author

Thanks for all the reviews @guolinke !

@jameslamb jameslamb merged commit c5ad987 into master Jan 9, 2024
41 checks passed
@jameslamb jameslamb deleted the cmake/copy-files branch January 9, 2024 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants