mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-09 23:34:23 +00:00
update readme
This commit is contained in:
parent
f3b4a01ce2
commit
b61af87b20
1 changed files with 29 additions and 26 deletions
55
README.md
55
README.md
|
|
@ -203,38 +203,41 @@ enum class Color { RED = 2, BLUE = 4, GREEN = 8 };
|
||||||
|
|
||||||
## Integration
|
## Integration
|
||||||
|
|
||||||
You should add the required file [magic_enum.hpp](include/magic_enum.hpp).
|
* You should add the required file [magic_enum.hpp](include/magic_enum.hpp).
|
||||||
|
|
||||||
If you are using [vcpkg](https://github.com/Microsoft/vcpkg/) on your project for external dependencies, then you can use the [magic-enum package](https://github.com/microsoft/vcpkg/tree/master/ports/magic-enum).
|
* If you are using [vcpkg](https://github.com/Microsoft/vcpkg/) on your project for external dependencies, then you can use the [magic-enum package](https://github.com/microsoft/vcpkg/tree/master/ports/magic-enum).
|
||||||
|
|
||||||
If you are using [Conan](https://www.conan.io/) to manage your dependencies, merely add `magic_enum/x.y.z` to your conan's requires, where `x.y.z` is the release version you want to use.
|
* If you are using [Conan](https://www.conan.io/) to manage your dependencies, merely add `magic_enum/x.y.z` to your conan's requires, where `x.y.z` is the release version you want to use.
|
||||||
|
|
||||||
Alternatively, you can use something like [CPM](https://github.com/TheLartians/CPM) which is based on CMake's `Fetch_Content` module.
|
* Alternatively, you can use something like [CPM](https://github.com/TheLartians/CPM) which is based on CMake's `Fetch_Content` module.
|
||||||
|
|
||||||
```cmake
|
```cmake
|
||||||
CPMAddPackage(
|
CPMAddPackage(
|
||||||
NAME magic_enum
|
NAME magic_enum
|
||||||
GITHUB_REPOSITORY Neargye/magic_enum
|
GITHUB_REPOSITORY Neargye/magic_enum
|
||||||
GIT_TAG x.y.z # Where `x.y.z` is the release version you want to use.
|
GIT_TAG x.y.z # Where `x.y.z` is the release version you want to use.
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
Bazel is also supported, simply add to your WORKSPACE file:
|
* Bazel is also supported, simply add to your WORKSPACE file:
|
||||||
```
|
|
||||||
http_archive(
|
|
||||||
name = "magic_enum",
|
|
||||||
strip_prefix = "magic_enum-<commit>",
|
|
||||||
urls = ["https://github.com/Neargye/magic_enum/archive/<commit>.zip"],
|
|
||||||
)
|
|
||||||
```
|
|
||||||
|
|
||||||
To use bazel inside the repository it's possible to do:
|
```
|
||||||
```
|
http_archive(
|
||||||
bazel build //...
|
name = "magic_enum",
|
||||||
bazel test //...
|
strip_prefix = "magic_enum-<commit>",
|
||||||
bazel run //:example
|
urls = ["https://github.com/Neargye/magic_enum/archive/<commit>.zip"],
|
||||||
```
|
)
|
||||||
(Note that you must use a supported compiler or specify it with `export CC= <compiler>`.)
|
```
|
||||||
|
|
||||||
|
To use bazel inside the repository it's possible to do:
|
||||||
|
|
||||||
|
```
|
||||||
|
bazel build //...
|
||||||
|
bazel test //...
|
||||||
|
bazel run //:example
|
||||||
|
```
|
||||||
|
|
||||||
|
(Note that you must use a supported compiler or specify it with `export CC= <compiler>`.)
|
||||||
|
|
||||||
## Compiler compatibility
|
## Compiler compatibility
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue