|
|
@@ -9,21 +9,37 @@ SmartBotic is a workflow automation and execution platform with a microservices
|
|
|
## Build Commands
|
|
|
|
|
|
### C++ Backend
|
|
|
+
|
|
|
+The existing `build/` directory is configured with **Ninja**, not Make. Running
|
|
|
+`make` in it prints "Nothing to be done" and builds nothing at all - it does not
|
|
|
+fail, so an edit looks built when it has not been. Always build through cmake,
|
|
|
+which uses whichever generator the directory was configured with:
|
|
|
+
|
|
|
+```bash
|
|
|
+# Everything
|
|
|
+cmake --build build -j8
|
|
|
+
|
|
|
+# One target - much faster when only one service changed
|
|
|
+cmake --build build --target smartbotic-webserver -j8
|
|
|
+cmake --build build --target smartbotic-runner -j8
|
|
|
+```
|
|
|
+
|
|
|
+Configuring a build directory from scratch:
|
|
|
+
|
|
|
```bash
|
|
|
-# Debug build
|
|
|
-mkdir build && cd build
|
|
|
-cmake -DCMAKE_BUILD_TYPE=Debug ..
|
|
|
-make
|
|
|
+# Debug
|
|
|
+cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
|
|
-# Release build
|
|
|
-cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
|
-make
|
|
|
+# Release
|
|
|
+cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
|
|
|
|
|
|
# With Address Sanitizer
|
|
|
-cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON ..
|
|
|
-make
|
|
|
+cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON
|
|
|
```
|
|
|
|
|
|
+After building a service, restart it to actually run the new binary:
|
|
|
+`systemctl --user restart smartbotic-webserver smartbotic-runner`.
|
|
|
+
|
|
|
### Frontend (webui/)
|
|
|
```bash
|
|
|
cd webui
|