mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
tex2lyx tests adapted to cmake build
This commit is contained in:
parent
d56295bcdf
commit
66cb259a96
@ -6,19 +6,14 @@
|
|||||||
|
|
||||||
project(test)
|
project(test)
|
||||||
|
|
||||||
set(_test_depend "${CMAKE_CURRENT_BINARY_DIR}/test.ltx")
|
set(_test_depend "test.ltx")
|
||||||
set(_test_output "${CMAKE_CURRENT_BINARY_DIR}/test.lyx.tex")
|
set(_test_output)
|
||||||
foreach(_arg runtests.py DummyDocument.tex test.ltx foo.eps foo.png)
|
#foreach(_arg runtests.py DummyDocument.tex test.ltx foo.eps foo.png)
|
||||||
configure_file("${TOP_SRC_DIR}/src/tex2lyx/test/${_arg}" "${CMAKE_CURRENT_BINARY_DIR}/${_arg}" COPYONLY)
|
# configure_file("${TOP_SRC_DIR}/src/tex2lyx/test/${_arg}" "${CMAKE_CURRENT_BINARY_DIR}/${_arg}" COPYONLY)
|
||||||
endforeach(_arg)
|
#endforeach(_arg)
|
||||||
|
|
||||||
foreach(_arg test-structure test-insets box-color-size-space-align CJK XeTeX-polyglossia)
|
foreach(_arg test-structure test-insets box-color-size-space-align CJK XeTeX-polyglossia)
|
||||||
add_custom_command(
|
list(APPEND _test_depend "${TOP_SRC_DIR}/src/tex2lyx/test/${_arg}.tex")
|
||||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_arg}.tex"
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${TOP_SRC_DIR}/src/tex2lyx/test/${_arg}.tex" "${CMAKE_CURRENT_BINARY_DIR}/${_arg}.tex"
|
|
||||||
DEPENDS "${TOP_SRC_DIR}/src/tex2lyx/test/${_arg}.tex"
|
|
||||||
)
|
|
||||||
list(APPEND _test_depend "${CMAKE_CURRENT_BINARY_DIR}/${_arg}.tex")
|
|
||||||
list(APPEND _test_output "${CMAKE_CURRENT_BINARY_DIR}/${_arg}.lyx.tex")
|
list(APPEND _test_output "${CMAKE_CURRENT_BINARY_DIR}/${_arg}.lyx.tex")
|
||||||
list(APPEND _test_output "${CMAKE_CURRENT_BINARY_DIR}/${_arg}.lyx.lyx")
|
list(APPEND _test_output "${CMAKE_CURRENT_BINARY_DIR}/${_arg}.lyx.lyx")
|
||||||
endforeach(_arg)
|
endforeach(_arg)
|
||||||
@ -26,10 +21,10 @@ endforeach(_arg)
|
|||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
OUTPUT ${_test_output}
|
OUTPUT ${_test_output}
|
||||||
COMMAND ${LYX_PYTHON_EXECUTABLE}
|
COMMAND ${LYX_PYTHON_EXECUTABLE}
|
||||||
ARGS "${CMAKE_CURRENT_BINARY_DIR}/runtests.py" "${TOP_BINARY_DIR}/bin/${_tex2lyx}" "${TOP_SRC_DIR}/lib/scripts"
|
ARGS "${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py" "${TOP_BINARY_DIR}/bin/${_tex2lyx}" "${TOP_SRC_DIR}/lib/scripts" "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
DEPENDS ${_tex2lyx} ${_test_depend}
|
DEPENDS ${_tex2lyx} ${_test_depend}
|
||||||
COMMENT "${LYX_PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/runtests.py" "${TOP_BINARY_DIR}/bin/${_tex2lyx}" "${TOP_SRC_DIR}/lib/scripts"
|
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}"
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(test DEPENDS ${_tex2lyx} ${_lyx} ${_test_output})
|
ADD_CUSTOM_TARGET(test DEPENDS ${_tex2lyx} ${_lyx} ${_test_output})
|
||||||
|
Loading…
Reference in New Issue
Block a user