Skip to content
Snippets Groups Projects

FindGit: Cache the version more effectively

Merged Craig Scott requested to merge craig.scott/cmake:FindGit-version-optimization-more into master
  1. Feb 05, 2021
    • Craig Scott's avatar
      FindGit: Cache the version more effectively · c99dfd7b
      Craig Scott authored
      In 315a200f (FindGit: Cache the GIT_EXECUTABLE version for the
      current run, 2021-01-20), the GIT_VERSION_STRING was meant to be
      cached after the first time it was computed for a given GIT_EXECUTABLE
      location. That logic assumed GIT_VERSION_STRING would be visible in
      the current scope, but it might not be. The global property alone is
      enough to check whether the version has been determined previously,
      so don't switch the logic based on whether GIT_VERSION_STRING is
      defined or not.
      
      Relates: #21703
      c99dfd7b
Loading