From 10124400a9e42c7d677cef8c8e69f93c3e489411 Mon Sep 17 00:00:00 2001 From: "Bernhard F.W. Gschaider" Date: Mon, 25 Oct 2010 22:24:06 +0200 Subject: [PATCH] Adapted to get mercurial-branch --HG-- branch : porousLagrangianBranch --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd8595535..647779e53 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()