Commit 9db3319d authored by jcfr's avatar jcfr
Browse files

ENH: Also use SlicerMacroToday within CMakeLists.txt to update Slicer_VERSION_PATCH

git-svn-id: http://svn.slicer.org/Slicer4/trunk@16327 3bd1e089-480b-0410-8dfb-8563597acbee
parent 616346d9
......@@ -277,31 +277,16 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${Slicer_BINARY_DIR}/lib)
SET(Slicer_VERSION_MAJOR "4")
SET(Slicer_VERSION_MINOR "0")
INCLUDE(CMake/SlicerMacroToday.cmake)
# Get build time
TODAY(Slicer_BUILDDATE)
IF(NOT Slicer_VERSION_PATCH)
SET(Slicer_VERSION_PATCH "gamma")
IF(WIN32)
EXECUTE_PROCESS(COMMAND cmd /c "date /T"
RESULT_VARIABLE getdate_result
OUTPUT_VARIABLE date
ERROR_VARIABLE date
OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE ".*(..)/(..)/(....)" "\\3-\\1-\\2" date ${date})
ELSEIF(UNIX)
EXECUTE_PROCESS(COMMAND date "+%Y-%m-%d"
RESULT_VARIABLE getdate_result
OUTPUT_VARIABLE date
ERROR_VARIABLE date
OUTPUT_STRIP_TRAILING_WHITESPACE)
ELSE()
SET(${date} 000000)
ENDIF (WIN32)
SET(Slicer_VERSION_PATCH "gamma-${date}")
SET(Slicer_VERSION_PATCH "gamma-${Slicer_BUILDDATE}")
ENDIF()
SET(Slicer_VERSION "${Slicer_VERSION_MAJOR}.${Slicer_VERSION_MINOR}")
SET(Slicer_VERSION_FULL "${Slicer_VERSION}.${Slicer_VERSION_PATCH}")
......@@ -646,11 +631,6 @@ SET(CMAKE_C_FLAGS ${Slicer_C_FLAGS} CACHE STRING "CMake CXX Flags" FORCE)
# Generate SlicerVersion.txt
#-----------------------------------------------------------------------------
INCLUDE(CMake/SlicerMacroToday.cmake)
# Get build time
TODAY(Slicer_BUILDDATE)
# Note that Slicer_BUILD is set above
SET(Slicer_WC_URL NA)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment