-
Notifications
You must be signed in to change notification settings - Fork 38
Development Environment
As outlined in our README file, to work on libSMCE you will need:
- A C++20 compiler
- CMake >= 3.16 (as well as a build system; best is Ninja)
- Boost >= 1.74
- OpenSSL
as well as arduino-cli
, which is needed at runtime, so running tests requires it.
What is not required for building or running libSMCE, but is very handy for development, is listed below:
- ClangFormat & ClangTidy
- Doxygen
- Debugger (GDB, LLDB, WinDbg)
- Memory analyzer (Valgrind)
- MQTT broker (Eclipse Mosquitto, Hummingbird, and alike)
- Packaging tools
- Debian/Ubuntu: Debian package development tools (
dpkg-dev
) - RHEL/Fedora & openSUSE: RPM development tools (
rpmdevtools
) - Windows: WiX Toolset
- Debian/Ubuntu: Debian package development tools (
-
Linux/BSD: both GCC and Clang/LLVM are great.
-
Windows: MSVC (the C++ toolchain of Microsoft Visual Studio) or Clang-cl are your options.
-
macOS: AppleClang (from XCode command line tools), GCC and Clang/LLVM will work.
Note that the more compilers you have at hand, the better for debugging.
As long as you have syntax highlighting for C++ and CMake, whatever you are most used to is probably best.
We use CLion, along with the CMake Plus plugin, since it has integrations for all the surrounding tools we need.
- Install Chocolatey
- Install CMake:
choco install cmake -y --installargs 'ADD_CMAKE_TO_PATH=System'
- Install Boost, OpenSSL, ArduinoCLI, Ninja, Git, Doxygen, and WiX:
choco install boost-msvc-14.2 openssl arduino-cli ninja git doxygen wixtoolset -y
- Install MSVC (warning: may take some time):
choco install visualstudio2019buildtools -y --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive --locale en-US"
- Clone your fork of the libSMCE repository
Time to open up the project in your favorite editor!
- Install Homebrew
- Install CMake:
brew install --cask cmake
- Install Boost, OpenSSL, ArduinoCLI, Ninja, Doxygen, and Git:
brew install boost openssl arduino-cli ninja doxygen git
- Install GCC & Clang/LLVM:
brew install gcc llvm
- Install AppleClang:
xcode-select --install
Note: If you are running macOS Catalina or earlier, you might get a message saying that the software is no longer present on Apple's update servers. In that case, go download the latest stable (non-beta) package on the Apple Developer Downloads page.
- Clone your fork of the libSMCE repository
Time to open up the project in your favorite editor!