-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use cfg_if for parry version finding & enable
parry_016
by default.
- Loading branch information
1 parent
ab1d177
commit 334ac4a
Showing
4 changed files
with
19 additions
and
12 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
|
||
#[cfg(feature = "parry_016")] | ||
pub use parry3d_016 as parry3d; | ||
|
||
#[cfg(feature = "parry_015")] | ||
pub use parry3d_015 as parry3d; | ||
|
||
#[cfg(all(feature = "parry_016", feature = "parry_015"))] | ||
compile_error!("You must pick a single parry3d feature."); | ||
|
||
#[cfg(all(not(feature = "parry_016"), not(feature = "parry_015")))] | ||
compile_error!("You must enabled a Parry3d feature matching your version. Either 0.16 or 0.15."); | ||
cfg_if::cfg_if! { | ||
if #[cfg(all(feature = "parry_016", feature = "parry_015"))] { | ||
compile_error!("You must pick a single parry3d feature."); | ||
} else if #[cfg(feature = "parry_015")] { | ||
pub use parry3d_015 as parry3d; | ||
} else if #[cfg(feature = "parry_016")] { | ||
pub use parry3d_016 as parry3d; | ||
} else { | ||
compile_error!("You must enabled either the `parry_015` or `parry_016` feature matching, whichever matches your Parry3d version."); | ||
} | ||
} |