Skip to content

Commit

Permalink
[build] getRevision, try also parent folder
Browse files Browse the repository at this point in the history
  • Loading branch information
mean committed Aug 8, 2016
1 parent 2f52c0c commit 493c064
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/admGetRevision.cmake
Expand Up @@ -9,15 +9,15 @@ if (EXISTS "${_dir}/.svn")
Subversion_WC_INFO( ${_dir} ADM_SVN)
SET(${_rev} ${ADM_SVN_WC_LAST_CHANGED_REV})
else (EXISTS "${_dir}/.svn")
if (EXISTS "${_dir}/.git")
if (EXISTS "${_dir}/.git" OR EXISTS "${_dir}/../.git")
MESSAGE(STATUS "Seems to be git or git-svn...")
include( FindGitSvn)
admGetGitRevision( ${_dir} ADM_GIT_SVN_REVISION)
SET(${_rev} ${ADM_GIT_SVN_REVISION})
else (EXISTS "${_dir}/.git")
ELSE (EXISTS "${_dir}/.git" OR EXISTS "${_dir}/../.git")
MESSAGE(STATUS "Dont know what SCM is used")
SET(${_rev} "0")
endif (EXISTS "${_dir}/.git")
ENDIF (EXISTS "${_dir}/.git" OR EXISTS "${_dir}/../.git")
endif (EXISTS "${_dir}/.svn")
#MESSAGE( STATUS "revision : ${${_rev}}" )
ENDMACRO(admGetRevision _dir _rev)

0 comments on commit 493c064

Please sign in to comment.