Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if (CONFIG_LIB_BOOST_SML)
zephyr_include_directories(../include)
endif()
7 changes: 7 additions & 0 deletions zephyr/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
config LIB_BOOST_SML
bool "Enable use of the boost::sml C++ state machine library"
default n
depends on CPP && !STD_CPP98 && !STD_CPP11 && !STD_CPP14
help
Include the boost::sml state machine language library,
see https://github.com/boost-ext/sml.
24 changes: 24 additions & 0 deletions zephyr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Support for using the boost::sml as a [Zephyr](https://docs.zephyrproject.org/latest/index.html) module

To use add the reposiory path to your west maifest file, probably `west.yml`. See the zephyr documentation on [project manifests](https://docs.zephyrproject.org/latest/develop/west/manifest.html#projects) for details.


``` yaml
projects:
- name: boost-sml
url: http://your.git.server/sml
revision: tag|branch|sha
```

Then run `west update` to pull in the code. You need to then add the following config options to `prj.conf` or whereever you manage your configuration.

```
CONFIG_CPP=y
CONFIG_STD_CPP17=y
CONFIG_REQUIRES_FULL_LIBCPP=y

# Include boost sml state machine
CONFIG_LIB_BOOST_SML=y
```

Then you can `#include <boost/sml.hpp>` to use the library.
3 changes: 3 additions & 0 deletions zephyr/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build:
cmake: zephyr
kconfig: zephyr/Kconfig
Loading