From 8a3148eb25cfd26c4449e6e34c3cba1e41ebc500 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 13 Jul 2018 11:41:25 -0700 Subject: 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. --- host/cmake/Modules/UHDVersion.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'host/cmake/Modules') 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 -- cgit v1.2.3