From 70dac835d36eb674a03ef6ec1be31070365dceaa Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Thu, 15 Mar 2018 22:34:26 +0100 Subject: [PATCH] Cmake export lyx* tests: Omit compilation of lyx16x, lyx20x and lyx21x exported files These file don't contain the \\origin tag. So the possibly included files with relative path would not be found. The compilation to the default pdf would then anyway fail. --- development/autotests/export.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/development/autotests/export.cmake b/development/autotests/export.cmake index 3800ef468a..4386660597 100755 --- a/development/autotests/export.cmake +++ b/development/autotests/export.cmake @@ -133,7 +133,19 @@ if (extension MATCHES "\\.lyx$") endif() # Check if result file identical to source file if(result_md5sum STREQUAL ${source_md5sum}) + if (format MATCHES "lyx(1[0-9]|2[01])x") + # Do not compile, missing \origin statement prevents inclusion of + # files with relative path + message(STATUS "Not exporting due to missing \\origin statement") + break() + endif() message(STATUS "Source(${LYX_SOURCE}) and dest(${result_file_name}) are equal") + message(STATUS "Now try to export the lyx2lyx created file") + message(STATUS "Executing ${lyx} -userdir \"${LYX_TESTS_USERDIR}\" -E default \"${result_file_name}.default\" \"${result_file_name}\"") + execute_process( + COMMAND ${lyx} -userdir "${LYX_TESTS_USERDIR}" -E default "${result_file_name}.default" "${result_file_name}" + RESULT_VARIABLE _err + ERROR_VARIABLE lyxerr) break() else() message(STATUS "Source(${LYX_SOURCE}) and dest(${result_file_name}) are still different")