-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust/src/lib.rs: affirm a deliberate choice triggering a warning.
- Loading branch information
Showing
1 changed file
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You're supposed to define features in
Cargo.toml
, not inbuild.rs
, then you'll not have to suppress warnings here. Users of the library should specify that they wantcuda
feature and thenbuild.rs
will either succeed in compiling software withcuda
support or compilation will fail.It is both surprising and confusing for Rust developers when features exist, but not defined in
Cargo.toml
. Users don't expect CUDA support unless they enable the feature, even if compiler happens to be present on the machine. Enabling it anyway unless user overridesNVCC
environment variable with something broken it just backwards.