BlueBrain / hpc-coding-conventions

Apache License 2.0
8 stars 5 forks source link

Add cmake files for handling submodules in 3rdparty #79

Closed alkino closed 3 years ago

tristan0x commented 3 years ago

Use-case in some projects:

tristan0x commented 3 years ago

This pull-request provides:

tristan0x commented 3 years ago

This pull-request provides:

  • A fix by replacing PROJECT_{SOURCE,BINARY}DIR instead of CMAKE{SOURCE_BINARY}_DIR. It fixes the use-case when a nested CMake project included in the top project with add_subdirectory uses the hpc-coding-conventions
  • a new CMake function named bbp_git_submodule in cpp/cmake/3rdparty.cmake to manage the handling of 3rd parties as git submodule. Please refer to the function documentation in 3rdparty.cmake for more details. I updated a couple of projects to take this new function into account, see my previous comment.

@ohm314 @matz-e @pramodk Please approve unless you have additional remarks.