commit 9b1f459f77486e508264ccff538e1a2a6e577cfc
Author: Kornel Benko <[email protected]>
Date:   Thu Oct 29 11:07:34 2015 +0100

    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.

diff --git a/src/tex2lyx/test/runtests.cmake b/src/tex2lyx/test/runtests.cmake
index 3e19ffb..863490b 100644
--- a/src/tex2lyx/test/runtests.cmake
+++ b/src/tex2lyx/test/runtests.cmake
@@ -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()

Reply via email to