1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
4 # Copyright (c) 2012 Kornel Benko, <kornel@lyx.org>
9 file(GLOB _tex_tests RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.ltx" "${CMAKE_CURRENT_SOURCE_DIR}/*.tex")
10 #set(_tex_tests test.ltx test-structure test-insets test-modules box-color-size-space-align CJK XeTeX-polyglossia)
11 list(REMOVE_ITEM _tex_tests DummyDocument.tex)
13 add_test(NAME tex2lyx/create_lyx
14 COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${_lyx})
16 add_test(NAME tex2lyx/create_tex2lyx
17 COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${_tex2lyx})
18 set_tests_properties(tex2lyx/create_tex2lyx PROPERTIES DEPENDS tex2lyx/create_lyx)
20 foreach(_fl ${_tex_tests})
22 add_test(NAME tex2lyx/roundtrip/${_fl}
23 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
24 COMMAND ${LYX_PYTHON_EXECUTABLE} "${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py"
25 "${TOP_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${_tex2lyx}"
26 "${TOP_SRC_DIR}/lib/scripts"
27 "${CMAKE_CURRENT_BINARY_DIR}"
29 set_tests_properties(tex2lyx/roundtrip/${_fl} PROPERTIES DEPENDS tex2lyx/create_tex2lyx)