Cmake tests: Remove the use of file(TIMESTAMP...)

Cmake versions prior to 2.8.11 don't know this command, but
our minimal requirenment is 2.6.4

Thank to Vincent, it is replaced by using 'if(file1 IS_NEWER_THAN file2)' comparision.
This commit is contained in:
Kornel Benko 2015-10-29 11:07:34 +01:00
parent 0ca63f4e27
commit 9b1f459f77

View File

@ -20,7 +20,6 @@
set(ENV{${LYX_USERDIR_VER}} ${LYX_TESTS_USERDIR})
message(STATUS "SCRIPT_DIR = ${SCRIPT_DIR}")
file(TIMESTAMP "${SCRIPT_DIR}/../configure.py" _config_time "%Y%j%H%M%S")
set(_configure_needed FALSE)
foreach(_f lyxrc.defaults lyxmodules.lst textclass.lst packages.lst)
if(NOT EXISTS "${LYX_TESTS_USERDIR}/${_f}")
@ -28,8 +27,7 @@ foreach(_f lyxrc.defaults lyxmodules.lst textclass.lst packages.lst)
set(_configure_needed TRUE)
break()
endif()
file(TIMESTAMP "${LYX_TESTS_USERDIR}/${_f}" _ftime "%Y%j%H%M%S")
if(_config_time STRGREATER _ftime)
if("${SCRIPT_DIR}/../configure.py" IS_NEWER_THAN "${LYX_TESTS_USERDIR}/${_f}")
message(STATUS "Configure needed, because \"${LYX_TESTS_USERDIR}/${_f}\" too old")
set(_configure_needed TRUE)
break()