]> git.lyx.org Git - lyx.git/blob - src/support/tests/supporttest.cmake
Remove dependency on NO_LAYOUT_CSS #define in Layout.cpp
[lyx.git] / src / support / tests / supporttest.cmake
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 # Script should be called like:
8 # cmake -DCommand=xxx \
9 #       -DInput=xxx \
10 #       -DOutput=xxx \
11 #       -P xxxx/supporttest.cmake
12 #
13
14 # Command: The executable, whose output is to be examined
15 # Input: The file name of expected data
16 # Output: The file name for data catched from output of the executable
17
18 execute_process(COMMAND "${Command}"
19   OUTPUT_FILE "${Output}"
20   RESULT_VARIABLE _testres)
21
22 if(_testres)
23   message(FATAL_ERROR "${Command} not working")
24 endif()
25
26 execute_process(COMMAND ${CMAKE_COMMAND} -E compare_files "${Input}" "${Output}"
27                 RESULT_VARIABLE _testres)
28 if(_testres)
29   message(FATAL_ERROR "Files are not eqal")
30 endif()