diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt new file mode 100644 index 00000000..1e04516f --- /dev/null +++ b/zephyr/CMakeLists.txt @@ -0,0 +1,3 @@ +if (CONFIG_LIB_BOOST_SML) + zephyr_include_directories(../include) +endif() diff --git a/zephyr/Kconfig b/zephyr/Kconfig new file mode 100644 index 00000000..046f9b36 --- /dev/null +++ b/zephyr/Kconfig @@ -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. diff --git a/zephyr/README.md b/zephyr/README.md new file mode 100644 index 00000000..1a21e494 --- /dev/null +++ b/zephyr/README.md @@ -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 ` to use the library. diff --git a/zephyr/module.yaml b/zephyr/module.yaml new file mode 100644 index 00000000..cbff6a1a --- /dev/null +++ b/zephyr/module.yaml @@ -0,0 +1,3 @@ +build: + cmake: zephyr + kconfig: zephyr/Kconfig