From 4f18efa3d1925e8c37890d23ec627aee684ecc96 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 12 Aug 2016 14:18:26 -0700 Subject: cmake: Fixed some bugs related to identifying git branch --- host/cmake/Modules/UHDVersion.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'host/cmake') diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index abf75b1b2..26003bcbf 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -52,9 +52,11 @@ IF(GIT_FOUND) RESULT_VARIABLE _git_branch_result ) IF(_git_branch_result EQUAL 0) - IF(_git_branch STREQUAL "maint") + SET(UHD_GIT_BRANCH ${_git_branch}) + IF(UHD_GIT_BRANCH STREQUAL "maint") MESSAGE(STATUS "Operating on maint branch (stable).") - ELSEIF(_git_branch STREQUAL "master") + SET(UHD_VERSION_DEVEL FALSE) + ELSEIF(UHD_GIT_BRANCH STREQUAL "master") MESSAGE(STATUS "Operating on master branch.") SET(UHD_VERSION_DEVEL TRUE) ELSE() @@ -65,7 +67,6 @@ IF(GIT_FOUND) ) SET(UHD_VERSION_PATCH ${_git_safe_branch}) SET(UHD_VERSION_DEVEL TRUE) - SET(UHD_GIT_BRANCH ${_git_branch}) ENDIF() ELSE() MESSAGE(STATUS "Could not determine git branch. Probably building from tarball.") -- cgit v1.2.3