Author: cfinck
Date: Sat Feb 28 00:36:49 2015
New Revision: 66480
URL:
http://svn.reactos.org/svn/reactos?rev=66480&view=rev
Log:
[CMAKE]
Use the STRING(timestamp ...) command introduced in CMake 2.8.11 to get rid of our today
macro and in particular the wmic dependency.
wmic requires administrator privileges on NT 5.x
Modified:
trunk/reactos/include/reactos/version.cmake
Modified: trunk/reactos/include/reactos/version.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/version.cm…
==============================================================================
--- trunk/reactos/include/reactos/version.cmake [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/version.cmake [iso-8859-1] Sat Feb 28 00:36:49 2015
@@ -1,18 +1,3 @@
-macro(today RESULT)
- if(CMAKE_HOST_WIN32)
- execute_process(COMMAND wmic os get LocalDateTime OUTPUT_VARIABLE RAWDATE)
- string(REPLACE "\n" ";" RAWDATE ${RAWDATE})
- LIST(GET RAWDATE 1 RAWDATE)
- string(SUBSTRING ${RAWDATE} 0 8 ${RESULT})
- elseif(CMAKE_HOST_UNIX)
- execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE
${RESULT})
- string(STRIP ${${RESULT}} ${RESULT})
- else()
- message(SEND_ERROR "date not implemented")
- set(${RESULT} 00000000)
- endif()
-endmacro()
-
macro(inttohex INTVALUE OUTPUT_VARIABLE)
list(APPEND HEXLIST 0 1 2 3 4 5 6 7 8 9 a b c d e f)
list(GET HEXLIST ${INTVALUE} ${OUTPUT_VARIABLE})
@@ -29,7 +14,7 @@
endwhile()
endmacro()
-today(KERNEL_VERSION_BUILD)
+string(TIMESTAMP KERNEL_VERSION_BUILD %Y%m%d UTC)
set(KERNEL_VERSION_MAJOR "0")
set(KERNEL_VERSION_MINOR "4")