]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/test/runtests.cmake
Update build time Python requirement to 2.8 (cmake edition)
[lyx.git] / src / tex2lyx / test / runtests.cmake
index 3e19ffb2703d6a7fada40d1d873e078c05f31327..2f4797ea6d4a8b3a7ad4671a700eede4e7242ba9 100644 (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()
@@ -53,8 +51,8 @@ if(_configure_needed)
   # Get binary directory of tex2lyx
   string(REGEX REPLACE "(.*)tex2lyx${_suffix}.*" "\\1" _bindir "${TEX2LYX_EXE}")
 
-  message(STATUS "executing ${LYX_PYTHON_EXECUTABLE} -tt \"${SCRIPT_DIR}/../configure.py\" ${_with_ver} \"--binary-dir=${_bindir}\"")
-  execute_process(COMMAND ${LYX_PYTHON_EXECUTABLE} -tt "${SCRIPT_DIR}/../configure.py"
+  message(STATUS "executing ${LYX_PYTHON_EXECUTABLE} \"${SCRIPT_DIR}/../configure.py\" ${_with_ver} \"--binary-dir=${_bindir}\"")
+  execute_process(COMMAND ${LYX_PYTHON_EXECUTABLE} "${SCRIPT_DIR}/../configure.py"
     ${_with_ver} "--binary-dir=${_bindir}"
     WORKING_DIRECTORY "${LYX_TESTS_USERDIR}"
   )
@@ -72,5 +70,3 @@ string(COMPARE NOTEQUAL  ${_err} 0 _erg)
 if(_erg)
   message(FATAL_ERROR "${PY_SCRIPT} failed")
 endif()
-
-