Initialise repository

Initialise repository of the Velia project.
* Added CMake, base code with logging and tests support,
  doxygen, clang-format, etc.
* Setup CI
* We do not use git submodules for this project (see below).

We are not directly using any code that is prone to frequent API
changes (that's why we are pinning specific commits of the whole dep
stack in, say, netconf-cli). Let's try to make C++ dependency handling
much easier in this project:

- keep reusing the prebuilt binaries from CzechLight/dependencies
- do not pin a specific commit here, just use whatever Zuul throws at us

One therefore doesn't have to check out a specific commit anymore. In
case there's a Depends-on, we still pull stuff from a preceding job in
the pipeline.

Perhaps we could reuse this *major* simplification in those more fragile
leaf projects that do require specific versions of dependencies; we have
some multi-project integration through Zuul -- but that's for future
work.

Co-authored-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Change-Id: Ib247216b73f1838645a01ac8c40436194305d9dd
diff --git a/cmake/ProjectGitVersionRunner.cmake b/cmake/ProjectGitVersionRunner.cmake
new file mode 100644
index 0000000..38fdf28
--- /dev/null
+++ b/cmake/ProjectGitVersionRunner.cmake
@@ -0,0 +1,22 @@
+if(GIT_EXECUTABLE AND EXISTS ${PROJECT_SOURCE_DIR}/.git)
+    execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty --long --always --tags
+        WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+        OUTPUT_VARIABLE ${VERSION_VARIABLE})
+    string(REPLACE "\n" "" "${VERSION_VARIABLE}" ${${VERSION_VARIABLE}})
+endif()
+
+if(${VERSION_VARIABLE})
+    set(${VERSION_VARIABLE}_H
+        "#define ${VERSION_VARIABLE} \"${${VERSION_VARIABLE}}\"\n"
+        )
+    message(STATUS "Building ${PROJECT_NAME} Git version ${${VERSION_VARIABLE}}")
+else()
+    set(${VERSION_VARIABLE}_H
+        "#define ${VERSION_VARIABLE} \"${FALLBACK_VERSION}\"\n"
+        )
+    message(STATUS "Building ${PROJECT_NAME} version: ${${VERSION_VARIABLE}}")
+endif()
+
+file(WRITE ${PROJECT_BINARY_DIR}/${VERSION_VARIABLE}.h.in ${${VERSION_VARIABLE}_H})
+execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
+    ${PROJECT_BINARY_DIR}/${VERSION_VARIABLE}.h.in ${PROJECT_BINARY_DIR}/${VERSION_VARIABLE}.h)