LaTeX "helpfully" split across lines (and which fowled up our regex).
Get around the problem by instead searching for "LaTeX Warning:" at
the beginning of the line. Hopefully (1) all versions of LaTeX
actually write this out and (2) it is not used for trivial
warnings.
When running LaTeX in batch mode, it might not print any output when a
failure occurs. So, when running in this mode, cat out the log failure
if a LaTeX error occurs.
The implementation for this wraps the latex call in a CMake script
that runs latex and checks the return value. If not a success value,
reads and then prints the log.
A user requested the ability to make the target names created by UseLATEX
different than the name of the main tex file. The use case was for a
multi-directory project with two or more subdirectories containing LaTeX
files with the same name.
In a large project, it is not uncommon to have LaTeX documents built in
different subdirectories and to have each subdirectory include
UseLATEX.cmake. However, loading UseLATEX.cmake multiple times caused
the pdf, dvi, etc. targets to be created multiple times even though the
intention is to have them loaded once. This change creates each target
only once.
The newest 3.* CMake versions may be missing in some distributions.
The most recent feature required by UseLATEX and its tests is
ced1d5eccd:
"Skip file-level dependencies on custom targets (#11332)". The commit is
included in the release version 2.8.4.
The following error messages are produced during compilation with
earlier CMake versions:
[100%] Built target UseLATEX_pdf
make[2]: *** No rule to make target `UseLATEX_pdf', needed by `UseLATEX_build/CMakeFiles/UseLATEX'. Stop.
Signed-off-by: Anatoly Borodin <anatoly.borodin@gmail.com>
A recent change from macros to functions changed the scoping rules
that caused the variable that held the raster scale to not be defined
where the build targets were generated (and thus scaling did not occur).