Skip to content
Permalink
Browse files

get year from CMake directly

  • Loading branch information...
tusharpm authored and isilkor committed May 7, 2017
1 parent bfe9449 commit 8fef67378d193e7d116c61b4b359a8788388d6fa
Showing with 1 addition and 8 deletions.
  1. +1 −7 cmake/Version.cmake
  2. +0 −1 tools/get_current_year.vbs
@@ -23,13 +23,7 @@ git_get_changeset_id(C4REVISION)
# Get year
############################################################################

IF(CMAKE_HOST_UNIX)
EXECUTE_PROCESS(COMMAND "date" "+%Y" OUTPUT_VARIABLE DATE)
ELSEIF(CMAKE_HOST_WIN32)
EXECUTE_PROCESS(COMMAND "cscript.exe" "//nologo" "${CMAKE_CURRENT_SOURCE_DIR}/tools/get_current_year.vbs" OUTPUT_VARIABLE DATE)
ENDIF()
STRING(REGEX REPLACE "(.+)\n" "\\1" YEARFIXED "${DATE}")
SET(C4COPYRIGHT_YEAR ${YEARFIXED})
STRING(TIMESTAMP C4COPYRIGHT_YEAR "%Y")

############################################################################
# Build version strings

This file was deleted.

0 comments on commit 8fef673

Please sign in to comment.
You can’t perform that action at this time.