1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00

Add support for the ROS build system (#161)

This commit is contained in:
Tim Clephas 2022-03-12 19:04:42 +01:00 committed by GitHub
parent 718d2601b2
commit 948c760939
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 1 deletions

View file

@ -139,7 +139,7 @@ enum class Color { RED = 2, BLUE = 4, GREEN = 8 };
// color_entries[0].first -> Color::RED
// color_entries[0].second -> "RED"
```
* Enum fusion for multi-level switch/case statements
```cpp
@ -250,6 +250,13 @@ enum class Color { RED = 2, BLUE = 4, GREEN = 8 };
(Note that you must use a supported compiler or specify it with `export CC= <compiler>`.)
* If you are using [Ros](https://www.ros.org/), you can include this package by adding `<depend>magic_enum</depend>` to your package.xml and include this package in your workspace. In your CMakeLists.txt add the following:
```cmake
find_package(magic_enum CONFIG REQUIRED)
...
target_link_libraries(your_executable magic_enum::magic_enum)
```
## Compiler compatibility
* Clang/LLVM >= 5