Adapted to get mercurial-branch

--HG--
branch : porousLagrangianBranch
This commit is contained in:
Bernhard F.W. Gschaider 2010-10-25 22:24:06 +02:00
parent 742628f19b
commit 10124400a9

View file

@ -125,6 +125,14 @@ if(GIT_FOUND)
OUTPUT_VARIABLE GIT_BRANCH_NAME
)
message("Git branch: ${GIT_BRANCH_NAME}")
if (GIT_BRANCH_NAME STREQUAL "")
message("No git-branch. Mercurial?")
EXEC_PROGRAM(hg
ARGS branch
OUTPUT_VARIABLE GIT_BRANCH_NAME
)
message("Git branch (mercurial): ${GIT_BRANCH_NAME}")
endif()
SET(BUILDNAME "${BUILDNAME}-git-branch:${GIT_BRANCH_NAME}")
endif()