1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
4 # Copyright (c) 2013 Kornel Benko kornel@lyx.org
7 # LYX2LYX = ${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx
10 # Script should be called like:
11 # cmake -DLYX2LYX=xxx \
12 # -DWORKDIR=${BUILD_DIR}/autotests/out-home \
14 # -P "${TOP_SRC_DIR}/development/autotests/lyx2lyxtest.cmake"
17 message(STATUS "Executing ${LYX2LYX} -e errors -o output ${LYXFILE}")
19 COMMAND ${LYX2LYX} -e errors -o output ${LYXFILE}
22 message(STATUS "Error output of lyx2lyx = ${_err}")
23 string(COMPARE NOTEQUAL ${_err} 0 _erg)
25 # Check file "errors" being empty
26 file(STRINGS "errors" foundErrors)
29 foreach(_l ${foundErrors})
30 message(STATUS "${_l}")
34 # Check file "output" being not empty
35 file(STRINGS "output" createdLyx)
38 message(STATUS "Created file empty")
42 message(FATAL_ERROR "lyx2lyx failed")