1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
4 # Copyright (c) 2017 Kornel Benko kornel@lyx.org
6 # Should be called like
7 # cmake -DCheckLayout=$<TARGET_FILE:check_layout>
8 # -DModule="${LYX_TESTS_USERDIR}/layouts/test${bn}"
9 # -DOutput="${CMAKE_CURRENT_BINARY_DIR}/${bn}.out${_checktype}"
10 # -P "${TOP_SRC_DIR}/src/tests/check_layout.cmake"
12 execute_process(COMMAND ${CheckLayout} ${Module} ${Output}
16 #message(STATUS "_out = \"${_out}\"")
17 string(COMPARE EQUAL ${_erg} 0 _erg1)
19 message(STATUS "_erg = \"${_erg}\"")
20 message(FATAL_ERROR "${CheckLayout} failed")
22 if (_err MATCHES "Error reading")
23 message(STATUS "_err = \"${_err}\"")
24 message(FATAL_ERROR "Errors found")