]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/CMakeLists.txt
Cmake build: tex2lyx
[lyx.git] / src / tex2lyx / test / CMakeLists.txt
1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
3 #
4 # Copyright (c) 2012 Kornel Benko, <kornel@lyx.org>
5 #
6
7 project(test)
8
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)
12
13 add_test(NAME tex2lyx/create_lyx
14   COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${_lyx})
15
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)
19
20 foreach(_fl ${_tex_tests})
21   set(fl ${_fl})
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}"
28     ${fl})
29   set_tests_properties(tex2lyx/roundtrip/${_fl} PROPERTIES DEPENDS tex2lyx/create_tex2lyx)
30 endforeach()
31
32