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 set(_test_depend "test.ltx")
11 #foreach(_arg runtests.py DummyDocument.tex test.ltx foo.eps foo.png)
12 # configure_file("${TOP_SRC_DIR}/src/tex2lyx/test/${_arg}" "${CMAKE_CURRENT_BINARY_DIR}/${_arg}" COPYONLY)
15 foreach(_arg test-structure test-insets box-color-size-space-align CJK XeTeX-polyglossia)
16 list(APPEND _test_depend "${TOP_SRC_DIR}/src/tex2lyx/test/${_arg}.tex")
17 list(APPEND _test_output "${CMAKE_CURRENT_BINARY_DIR}/${_arg}.lyx.tex")
18 list(APPEND _test_output "${CMAKE_CURRENT_BINARY_DIR}/${_arg}.lyx.lyx")
22 OUTPUT ${_test_output}
23 COMMAND ${LYX_PYTHON_EXECUTABLE}
24 ARGS "${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py" "${TOP_BINARY_DIR}/bin/${_tex2lyx}" "${TOP_SRC_DIR}/lib/scripts" "${CMAKE_CURRENT_BINARY_DIR}"
25 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
26 DEPENDS ${_tex2lyx} ${_test_depend}
27 COMMENT "${LYX_PYTHON_EXECUTABLE}" "${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py" "${TOP_BINARY_DIR}/bin/${_tex2lyx}" "${TOP_SRC_DIR}/lib/scripts" "${CMAKE_CURRENT_BINARY_DIR}"
30 ADD_CUSTOM_TARGET(test DEPENDS ${_tex2lyx} ${_lyx} ${_test_output})