Skip to content

Add emper::getFullVersion()

Maxim Onciul requested to merge emper-version into master

This also solves a dependency declaration issue in WorkerSleepExample: Prior to this change, a clean build could potentially result in

ninja -C build ninja: Entering directory `build' [13/57] Compiling C++ object apps/worker_sleep_example.p/WorkerSleepExample.cpp.o FAILED: apps/worker_sleep_example.p/WorkerSleepExample.cpp.o ccache c++ -Iapps/worker_sleep_example.p -Iapps -I../apps -Iemper -I../emper -Iemper/include -I../emper/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -Werror -std=c++17 -O2 -g -Wno-non-virtual-dtor -MD -MQ apps/worker_sleep_example.p/WorkerSleepExample.cpp.o -MF apps/worker_sleep_example.p/WorkerSleepExample.cpp.o.d -o apps/worker_sleep_example.p/WorkerSleepExample.cpp.o -c ../apps/WorkerSleepExample.cpp ../apps/WorkerSleepExample.cpp:12:10: fatal error: emper-version.h: No such file or directory 12 | #include "emper-version.h" // for EMPER_FULL_VERSION | ^~~~~~~~~~~~~~~~~ compilation terminated. [17/57] Generating emper-version.h with a custom command ninja: build stopped: subcommand failed. make: *** [Makefile:23: build] Error 1

because worker_sleep_example_exec should have also depend on emper_version_h. However this is obviously error prone, as users easily forget to add this dependency. Instead we add emper::getFullVersion() which is part of the EMPER shared object (not just of a single header).

Merge request reports

Loading