bluerobotics / ping-cpp

C++ API implementation of ping-protocol
13 stars 13 forks source link

Include hal directory, add check for generated headers #39

Closed incebellipipo closed 1 year ago

incebellipipo commented 2 years ago

This PR includes commits from pull request 38, 6a9db50. Closes PR https://github.com/bluerobotics/ping-cpp/pull/35

About commit c092f97ececca2e727223ecc548bc5c8a45d957c Using add_custom_command and add_custom_target separately allows user to take advantage of OUTPUT directive in add_custom_command for automatic file generation. Using add_custom_target with generated files as its DEPENDS prevents generator script to be executed for the files that are already generated. By doing so, a simple CMakelists.txt file would be enough to compile the "deployment" branch.

cmake_minimum_required(VERSION 3.12)
project(ping-cpp LANGUAGES CXX)

add_subdirectory(src/device)
add_subdirectory(src/hal)
add_subdirectory(src/message)
.                         
├── CMakeLists.txt               # <------ This CMakeLists.txt file
└── src                           
    ├── device           
    │   ├── CMakeLists.txt                          
    │   ├── ...
    ├── hal                                         
    │   ├── CMakeLists.txt                          
    │   ├── ...
    └── message                                     
        ├── CMakeLists.txt                          
        ├── ...

Resulting deployment branch can be seen here: https://github.com/GSO-soslab/ping-cpp/tree/deployment

About commit 7a912683d42e8f6a3e75aec62d494e081ab7e162 It just adds hal directory into git branch so that travis can push it.

incebellipipo commented 1 year ago

due to inactivity, i'm closing the issue.