2 macro(CheckLoadErrors lyxerrx PARAMS_DIR res_erg)
3 set(lyxerr ${${lyxerrx}})
7 set(DocumentClassNotAvailable 0)
8 file(STRINGS "${PARAMS_DIR}/filterCheckWarnings" ignoreRegexp)
9 # Split lyxerr into lines
10 string(REGEX REPLACE "[\n]+" ";" foundErrors ${lyxerr})
11 foreach(_l ${foundErrors})
13 if(_l MATCHES "LyX: Done!")
14 set(ConfigureOutput 0)
16 elseif(DocumentClassNotAvailable)
17 if(_l MATCHES "User's Guide for more information.")
18 set(DocumentClassNotAvailable 0)
21 if(_l MATCHES "reconfiguring user directory")
22 set(ConfigureOutput 1)
23 elseif(_l MATCHES "Warning: Document class not available")
24 set(DocumentClassNotAvailable 1)
26 # here neither ConfigureOutput nor DocumentClassNotAvailable is set
27 # so we can scan for other warnings/errors
29 foreach(_r ${ignoreRegexp})
30 if(_l MATCHES "${_r}")
36 message(STATUS "Error line = ${_l}")
37 # It is error, because the error-line does not match
38 # any ignoring expression
45 set(${res_erg} ${_erg})