diff --git a/CMakeLists.txt b/CMakeLists.txt index 9370cea75..26e717d73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,11 +130,12 @@ if(GIT_FOUND) ARGS id OUTPUT_VARIABLE GIT_BRANCH_NAME ) + string(REPLACE " " "_" GIT_BRANCH_NAME ${GIT_BRANCH_NAME}) + string(REPLACE "+" "_modified" GIT_BRANCH_NAME ${GIT_BRANCH_NAME}) + SET(GIT_BRANCH_NAME "hg_${GIT_BRANCH_NAME}") message("Git branch (mercurial): ${GIT_BRANCH_NAME}") endif() - SET(BUILDNAME "${BUILDNAME}-git-branch='hg_${GIT_BRANCH_NAME}'") - string(REPLACE " " "_" BUILDNAME ${BUILDNAME}) - string(REPLACE "+" "_modified" BUILDNAME ${BUILDNAME}) + SET(BUILDNAME "${BUILDNAME}-git-branch=${GIT_BRANCH_NAME}") endif() # Some last minute cleanup diff --git a/testHarness/foam-extend/3.0/CMakeFiles/CMakeLists.txt b/testHarness/foam-extend/3.0/CMakeFiles/CMakeLists.txt index 9370cea75..26e717d73 100644 --- a/testHarness/foam-extend/3.0/CMakeFiles/CMakeLists.txt +++ b/testHarness/foam-extend/3.0/CMakeFiles/CMakeLists.txt @@ -130,11 +130,12 @@ if(GIT_FOUND) ARGS id OUTPUT_VARIABLE GIT_BRANCH_NAME ) + string(REPLACE " " "_" GIT_BRANCH_NAME ${GIT_BRANCH_NAME}) + string(REPLACE "+" "_modified" GIT_BRANCH_NAME ${GIT_BRANCH_NAME}) + SET(GIT_BRANCH_NAME "hg_${GIT_BRANCH_NAME}") message("Git branch (mercurial): ${GIT_BRANCH_NAME}") endif() - SET(BUILDNAME "${BUILDNAME}-git-branch='hg_${GIT_BRANCH_NAME}'") - string(REPLACE " " "_" BUILDNAME ${BUILDNAME}) - string(REPLACE "+" "_modified" BUILDNAME ${BUILDNAME}) + SET(BUILDNAME "${BUILDNAME}-git-branch=${GIT_BRANCH_NAME}") endif() # Some last minute cleanup