Skip to content

Commit 1c82f2e

Browse files
committed
update
1 parent f1bb510 commit 1c82f2e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

cmake/modules/Preprocess.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,16 +395,24 @@ function(qm_generate_build_info _file)
395395

396396
set(_definitions)
397397

398+
set(_has_time off)
399+
398400
# year
399401
if(FUNC_YEAR)
400402
string(TIMESTAMP _build_year "%Y")
401403
list(APPEND _definitions ${_prefix}_BUILD_YEAR=\"${_build_year}\")
404+
set(_has_time on)
402405
endif()
403406
404407
# time
405408
if(FUNC_TIME)
406409
string(TIMESTAMP _build_time "%Y/%m/%d %H:%M:%S")
407410
list(APPEND _definitions ${_prefix}_BUILD_TIME=\"${_build_time}\")
411+
set(_has_time on)
412+
endif()
413+
414+
if(_has_time)
415+
list(APPEND _definitions "%")
408416
endif()
409417
410418
# system

0 commit comments

Comments
 (0)