tud-zih-energy / lo2s

Linux OTF2 Sampling - A Lightweight Node-Level Performance Monitoring Tool
https://tu-dresden.de/zih/forschung/projekte/lo2s?set_language=en
GNU General Public License v3.0
45 stars 13 forks source link

Use ExternalProject to download and build otf2xx and nitro #285

Closed cvonelm closed 1 year ago

cvonelm commented 1 year ago

While trying to build a bpf proof of concept using libbpf, I have discovered a useful CMake Command "ExternalProject_Add", which can be used to download (using git for example) and build external dependencies.

One clear advantage of "ExternalProject_Add" is that it doesn't need submodules to work. Currently, the lo2s release tarballs are somewhat useless because CMake can not clone the otf2xx and nitro submodules because it is not a git repository.

tilsche commented 1 year ago

You have to consider that this is more annoying to work with when doing actual development, especially when you have to do changes in the submodules. Not that submodules are intuitive, but it's still easier to make changes on the fly and apply them to the master or a branch of the included repo. Or am I overlooking something?

bmario commented 1 year ago

One clear advantage of "ExternalProject_Add" is that it doesn't need submodules to work. Currently, the lo2s release tarballs are somewhat useless because CMake can not clone the otf2xx and nitro submodules because it is not a git repository.

This is why the CMake is looking for git-archive-all. Install that, and you can generate release tarballs containing the submodules. This is automatically done in the CI already.

cvonelm commented 1 year ago

Closing as there is no real reason to switch here.