diff --git a/src/Cedar/CMakeLists.txt b/src/Cedar/CMakeLists.txt index 19d5b60e..19b191bf 100644 --- a/src/Cedar/CMakeLists.txt +++ b/src/Cedar/CMakeLists.txt @@ -42,12 +42,15 @@ string(TIMESTAMP BUILD_MINUTE "%M" UTC) string(TIMESTAMP BUILD_SECOND "%S" UTC) ## Remove leading 0 -string(REGEX REPLACE "^0" "" BUILD_DAY "${BUILD_DAY}") -string(REGEX REPLACE "^0" "" BUILD_MONTH "${BUILD_MONTH}") -string(REGEX REPLACE "^0" "" BUILD_YEAR "${BUILD_YEAR}") -string(REGEX REPLACE "^0" "" BUILD_HOUR "${BUILD_HOUR}") -string(REGEX REPLACE "^0" "" BUILD_MINUTE "${BUILD_MINUTE}") -string(REGEX REPLACE "^0" "" BUILD_SECOND "${BUILD_SECOND}") +string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_DAY "${BUILD_DAY}") +string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_MONTH "${BUILD_MONTH}") +string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_YEAR "${BUILD_YEAR}") +string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_HOUR "${BUILD_HOUR}") +string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_MINUTE "${BUILD_MINUTE}") +string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_SECOND "${BUILD_SECOND}") + +message(STATUS "Build date: ${BUILD_DAY}/${BUILD_MONTH}/${BUILD_YEAR}") +message(STATUS "Build time: ${BUILD_HOUR}:${BUILD_MINUTE}:${BUILD_SECOND}") add_definitions(-DBUILD_DATE_D=${BUILD_DAY} -DBUILD_DATE_M=${BUILD_MONTH} -DBUILD_DATE_Y=${BUILD_YEAR}) add_definitions(-DBUILD_DATE_HO=${BUILD_HOUR} -DBUILD_DATE_MI=${BUILD_MINUTE} -DBUILD_DATE_SE=${BUILD_SECOND})