]> git.lyx.org Git - features.git/blobdiff - src/tex2lyx/test/CMakeLists.txt
Cmake tests: Get rid of use of command 'env', which is not available under Windows.
[features.git] / src / tex2lyx / test / CMakeLists.txt
index ded8cd26070f168ffda6613a70e5c7ce71538f04..304e1623f3023a48dc635b3428bb68226da0529b 100644 (file)
@@ -11,9 +11,11 @@ project(test)
 #list(REMOVE_ITEM _tex_tests DummyDocument.tex)
 
 set(_tex_tests test.ltx
+               algo2e.tex
                box-color-size-space-align.tex
                CJK.tex
                CJKutf8.tex
+               test-insets-basic.tex
                test-insets.tex
                test-memoir.tex
                test-modules.tex
@@ -21,8 +23,7 @@ set(_tex_tests test.ltx
                test-scr.tex
                test-structure.tex
                verbatim.tex
-               XeTeX-polyglossia.tex
-               algo2e.tex)
+               XeTeX-polyglossia.tex)
 
 set(runtestsScript "${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py")
 set(scriptDir "${TOP_SRC_DIR}/lib/scripts")
@@ -63,10 +64,14 @@ add_dependencies(lyx_run_tests ${_tex2lyx} ${_lyx})
 add_custom_command(
   OUTPUT LyxTestFiles
   COMMAND ${CMAKE_COMMAND} -E touch LyxTestFiles
-  COMMAND env LYX_USERDIR_VER=${LYX_USERDIR_VER} 
-    ${LYX_PYTHON_EXECUTABLE} "${runtestsScript}" $<TARGET_FILE:${_tex2lyx}> "${scriptDir}" "${CMAKE_CURRENT_SOURCE_DIR}"
+  COMMAND ${CMAKE_COMMAND}
+    -DENVIRON="${LYX_USERDIR_VER}=${LYX_TESTS_USERDIR}"
+    -DCOMMAND="${LYX_PYTHON_EXECUTABLE}"
+    -DPARAMS="${runtestsScript}'$<TARGET_FILE:${_tex2lyx}>'${scriptDir}'${CMAKE_CURRENT_SOURCE_DIR}"
+    -P ${TOP_SRC_DIR}/src/tex2lyx/test/env_custom_command.cmake
   WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
   DEPENDS ${_tex2lyx} ${_lyx}
 )
 
 add_custom_target(updatetex2lyxtests DEPENDS LyxTestFiles)
+set_target_properties(updatetex2lyxtests PROPERTIES FOLDER "tests/tex2lyx")