diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cfabcd86..493da023b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,10 +30,9 @@ cmake_minimum_required(VERSION 2.6) project(rocksdb) include(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty.inc) - -execute_process(COMMAND $ENV{COMSPEC} " /C date /T" OUTPUT_VARIABLE DATE) -execute_process(COMMAND $ENV{COMSPEC} " /C time /T" OUTPUT_VARIABLE TIME) -string(REGEX REPLACE "(..)/(..)/..(..).*" "\\1/\\2/\\3" DATE ${DATE}) +execute_process(COMMAND powershell -Command "Get-Date -format MM_dd_yyyy" OUTPUT_VARIABLE DATE) +execute_process(COMMAND powershell -Command "Get-Date -format HH:mm:ss" OUTPUT_VARIABLE TIME) +string(REGEX REPLACE "(..)_(..)_..(..).*" "\\1/\\2/\\3" DATE ${DATE}) string(REGEX REPLACE "(..):(.....).*" " \\1:\\2" TIME ${TIME}) string(CONCAT GIT_DATE_TIME ${DATE} ${TIME})