Skip to content

Enhance git revision handling for cppTango

Rodrigo Tobar requested to merge git-revision into release/9.5.0

This MR contains four commits, which relate to the two problems described in !1164 (merged):

  • The first two commits first introduce a Tango::git_revision() function, then re-define the TANGO_GIT_REVISION macro in terms of that function. This avoid recompilation of the entire project when the git revision changes. This is a backwards-incompatible change in the sense that the TANGO_GIT_REVISION value cannot be used during preprocessing, but after grepping through cppTango, pytango and tango-docs I couldn't find any reference to this macro except for where it's defined.
  • The third commit introduces a new mechanism that triggers a cmake reconfiguration whenever the source tree changes to a new commit. In the first version of this MR I reused a solution that was designed around the limitations of cmake 2.6, which now I have completely reworked to use the CMAKE_CONFIGURE_DEPENDS property instead.
  • The fourth commit simply moves the existing git describe logic out of the top-level CMakeLists.txt file and into the new git.cmake file that is introduced in the previous commit.
Edited by Rodrigo Tobar

Merge request reports