diff --git a/cmake/Conky.cmake b/cmake/Conky.cmake index 87b0282d..d9910ed6 100644 --- a/cmake/Conky.cmake +++ b/cmake/Conky.cmake @@ -97,19 +97,6 @@ endif(NOT RELEASE) mark_as_advanced(APP_GAWK APP_WC APP_DATE APP_UNAME) -if(CMAKE_BUILD_TYPE MATCHES "Debug") - set(DEBUG true) -endif(CMAKE_BUILD_TYPE MATCHES "Debug") - -# The version numbers are simply derived from the date and number of commits -# since start of month -if(DEBUG) - execute_process(COMMAND - ${APP_GIT} --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git log - --since=${VERSION_MAJOR}-${VERSION_MINOR}-01 --pretty=oneline COMMAND - ${APP_WC} -l COMMAND ${APP_GAWK} "{print $1}" RESULT_VARIABLE RETVAL - OUTPUT_VARIABLE COMMIT_COUNT OUTPUT_STRIP_TRAILING_WHITESPACE) -endif(DEBUG) #BUILD_DATE=$(LANG=en_US LC_ALL=en_US LOCALE=en_US date) #BUILD_ARCH="$(uname -sr) ($(uname -m))" execute_process(COMMAND ${APP_DATE} RESULT_VARIABLE RETVAL OUTPUT_VARIABLE diff --git a/cmake/ConkyPlatformChecks.cmake b/cmake/ConkyPlatformChecks.cmake index 8562c0bc..1245aae4 100644 --- a/cmake/ConkyPlatformChecks.cmake +++ b/cmake/ConkyPlatformChecks.cmake @@ -367,3 +367,16 @@ if(MAINTAINER_MODE) mark_as_advanced(APP_DB2X_XSLTPROC APP_DB2X_MANXML APP_XSLTPROC APP_MAN APP_SED APP_LESS) endif(MAINTAINER_MODE) +if(CMAKE_BUILD_TYPE MATCHES "Debug") + set(DEBUG true) +endif(CMAKE_BUILD_TYPE MATCHES "Debug") + +# The version numbers are simply derived from the date and number of commits +# since start of month +if(DEBUG) + execute_process(COMMAND + ${APP_GIT} --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git log + --since=${VERSION_MAJOR}-${VERSION_MINOR}-01 --pretty=oneline COMMAND + ${APP_WC} -l COMMAND ${APP_GAWK} "{print $1}" RESULT_VARIABLE RETVAL + OUTPUT_VARIABLE COMMIT_COUNT OUTPUT_STRIP_TRAILING_WHITESPACE) +endif(DEBUG)