1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
4 # Copyright (c) 2012 Kornel Benko kornel@lyx.org
7 # Script should be called like:
8 # cmake -DCommand=xxx \
11 # -P xxxx/supporttest.cmake
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
18 execute_process(COMMAND "${Command}"
19 OUTPUT_FILE "${Output}"
20 RESULT_VARIABLE _testres)
23 message(FATAL_ERROR "${Command} not working")
26 execute_process(COMMAND ${CMAKE_COMMAND} -E compare_files "${Input}" "${Output}"
27 RESULT_VARIABLE _testres)
29 message(FATAL_ERROR "Files are not eqal")