aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-07-13 11:41:25 -0700
committerMartin Braun <martin.braun@ettus.com>2018-07-14 11:16:05 -0700
commit8a3148eb25cfd26c4449e6e34c3cba1e41ebc500 (patch)
tree2defb15ccf15686a199c9f3539c3beaa8cadb569
parent72e5fda9323a2f485da5d5e66d0e42002190a11b (diff)
downloaduhd-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.
-rw-r--r--host/cmake/Modules/UHDVersion.cmake4
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