Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
SineStriker committed Feb 5, 2024
1 parent f1bb510 commit 1c82f2e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmake/modules/Preprocess.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -395,16 +395,24 @@ function(qm_generate_build_info _file)

set(_definitions)

set(_has_time off)

# year
if(FUNC_YEAR)
string(TIMESTAMP _build_year "%Y")
list(APPEND _definitions ${_prefix}_BUILD_YEAR=\"${_build_year}\")
set(_has_time on)
endif()

# time
if(FUNC_TIME)
string(TIMESTAMP _build_time "%Y/%m/%d %H:%M:%S")
list(APPEND _definitions ${_prefix}_BUILD_TIME=\"${_build_time}\")
set(_has_time on)
endif()

if(_has_time)
list(APPEND _definitions "%")
endif()

# system
Expand Down

0 comments on commit 1c82f2e

Please sign in to comment.