diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-07-13 11:41:25 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-07-14 11:16:05 -0700 |
commit | 8a3148eb25cfd26c4449e6e34c3cba1e41ebc500 (patch) | |
tree | 2defb15ccf15686a199c9f3539c3beaa8cadb569 /host | |
parent | 72e5fda9323a2f485da5d5e66d0e42002190a11b (diff) | |
download | uhd-8a3148eb25cfd26c4449e6e34c3cba1e41ebc500.tar.gz uhd-8a3148eb25cfd26c4449e6e34c3cba1e41ebc500.tar.bz2 uhd-8a3148eb25cfd26c4449e6e34c3cba1e41ebc500.zip |
cmake: Allow to override UHD_GIT_BRANCH from CMake
Use cmake -DUHD_GIT_BRANCH_OVERRIDE=$branchname. This can be helpful
when building from tarballs, but you need to have the branch
information.
Diffstat (limited to 'host')
-rw-r--r-- | host/cmake/Modules/UHDVersion.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index 1f64339cb..2f03efe1a 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -64,6 +64,10 @@ IF(GIT_FOUND) ELSE(GIT_FOUND) MESSAGE(WARNING "Could not detect git executable! Could not determine exact version of UHD!") ENDIF(GIT_FOUND) +IF(DEFINED UHD_GIT_BRANCH_OVERRIDE) + MESSAGE(STATUS "Overriding auto-detected git branch and setting to: ${UHD_GIT_BRANCH_OVERRIDE}") + SET(UHD_GIT_BRANCH ${UHD_GIT_BRANCH_OVERRIDE}) +ENDIF(DEFINED UHD_GIT_BRANCH_OVERRIDE) ######################################################################## # Version information discovery through git log |