Keep the colleague's microbu-esp32c5 tree in this repository

obu-firmware builds against vanetza-idf from microbu-esp32c5/external, but
that tree was gitignored, so a clone of this repository could not build the
firmware it ships. It is now committed here as ordinary files in its own
folder, microbu-esp32c5/: the colleague's commit cf4b99f plus the V2X2MAP
bridge's signature verification (--trust) used on the bench. Nothing is
fetched from or pushed to the colleague's repository; this repository and
its remotes carry everything. The folder's own .gitignore keeps build output,
downloaded components and private key material out, as it did there; the
committed file set is identical to that repository's tracked files.

The ESP32-C5 is still flashed from obu-firmware/, which only takes
vanetza-idf from microbu-esp32c5/, so the two stay separate folders.
FLASHING.md says how to take a newer version of the colleague's tree (copy
it over the folder, rebuild, test, commit).
This commit is contained in:
Ashin Walpola
2026-09-23 17:46:40 +02:00
parent 2f60623e18
commit 0e9525162d
9881 changed files with 1582523 additions and 17 deletions
@@ -0,0 +1,59 @@
#
# configure_gtest_directory(
# [SOURCES <srcs...>]
# [LINK_LIBRARIES <libs...>]
# [INCLUDE_DIRECTORIES <dirs...>]
# [COMPILE_DEFINITIONS <defs...>])
#
# Set GTest properties common for all unit test executables in current directory.
#
function(configure_gtest_directory)
cmake_parse_arguments(args "" "" "SOURCES;LINK_LIBRARIES;INCLUDE_DIRECTORIES;COMPILE_DEFINITIONS" ${ARGN})
if(args_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "unknown arguments given to configure_gtest_directory: ${args_UNPARSED_ARGUMENTS}")
endif()
set_property(DIRECTORY PROPERTY GTEST_SOURCES ${args_SOURCES})
set_property(DIRECTORY PROPERTY GTEST_LINK_LIBRARIES ${args_LINK_LIBRARIES})
set_property(DIRECTORY PROPERTY GTEST_INCLUDE_DIRECTORIES ${args_INCLUDE_DIRECTORIES})
set_property(DIRECTORY PROPERTY GTEST_COMPILE_DEFINITIONS ${args_COMPILE_DEFINITIONS})
endfunction()
#
# add_gtest(<name>
# [SOURCES] <srcs...>
# [LINK_LIBRARIES <libs...>]
# [INCLUDE_DIRECTORIES <dirs...>]
# [COMPILE_DEFINITIONS <defs...>])
#
# Add a CTest unit test executable using Google Test.
# The executable will be built as specified by given arguments and directory properties.
#
function(add_gtest name)
set(target GTest_${name})
cmake_parse_arguments(args "" "" "SOURCES;LINK_LIBRARIES;INCLUDE_DIRECTORIES;COMPILE_DEFINITIONS" ${ARGN})
get_directory_property(sources GTEST_SOURCES)
list(APPEND sources "${args_SOURCES}" "${args_UNPARSED_ARGUMENTS}")
get_directory_property(link_libraries GTEST_LINK_LIBRARIES)
list(APPEND link_libraries "${args_LINK_LIBRARIES}" ${GTest_MAIN_LIBRARY})
get_directory_property(include_directories GTEST_INCLUDE_DIRECTORIES)
list(APPEND include_directories "${args_INCLUDE_DIRECTORIES}" ${GTest_INCLUDE_DIR})
get_directory_property(compile_definitions GTEST_COMPILE_DEFINITIONS)
list(APPEND compile_definitions "${args_COMPILE_DEFINITIONS}")
if(NOT sources)
message(FATAL_ERROR "no sources given to add_gtest")
endif()
add_executable(${target} ${sources})
set_target_properties(${target} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/tests
FOLDER "GTest"
LINK_LIBRARIES "${link_libraries}"
INCLUDE_DIRECTORIES "${include_directories}"
COMPILE_DEFINITIONS "${compile_definitions}")
add_test(NAME ${name}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND ${target})
endfunction()