Skip to content

Commit

Permalink
UseLATEX.cmake: Never add dvi target to default target
Browse files Browse the repository at this point in the history
Jira: None

The standard UseLATEX.cmake always adds at least one LaTeX target to the default target. However, not every time we run make, we actually want to update our LaTeX documents. I changed UseLATEX.cmake so that it only adds a LaTeX target to the default target if DEFAULT_PDF or DEFAULT_SAFEPDF are set.
  • Loading branch information
Florian Schoppmann authored and Florian Schoppmann committed Jul 19, 2012
1 parent 1afb10f commit ed791a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
16 changes: 11 additions & 5 deletions cmake/UseLATEX.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## Modification by Florian Schoppmann, July 18, 2012:
## The dvi target is never added to the default target.
## Modification by Florian Schoppmann, Mar 12, 2012:
## Move check for IMAGEMAGICK_CONVERT from immediately behind
## "FIND_PROGRAM(... convert" into LATEX_ADD_CONVERT_COMMAND
Expand Down Expand Up @@ -1167,13 +1169,17 @@ FUNCTION(ADD_LATEX_TARGETS_INTERNAL)
COMMAND ${make_dvi_command}
DEPENDS ${make_dvi_depends}
)
IF (LATEX_DEFAULT_PDF OR LATEX_DEFAULT_SAFEPDF)
# BEGIN Removed by Florian Schoppmann
# IF (LATEX_DEFAULT_PDF OR LATEX_DEFAULT_SAFEPDF)
# END Removed by Florian Schoppmann
ADD_CUSTOM_TARGET(${dvi_target}
DEPENDS ${output_dir}/${LATEX_TARGET}.dvi)
ELSE (LATEX_DEFAULT_PDF OR LATEX_DEFAULT_SAFEPDF)
ADD_CUSTOM_TARGET(${dvi_target} ALL
DEPENDS ${output_dir}/${LATEX_TARGET}.dvi)
ENDIF (LATEX_DEFAULT_PDF OR LATEX_DEFAULT_SAFEPDF)
# BEGIN Removed by Florian Schoppmann
# ELSE (LATEX_DEFAULT_PDF OR LATEX_DEFAULT_SAFEPDF)
# ADD_CUSTOM_TARGET(${dvi_target} ALL
# DEPENDS ${output_dir}/${LATEX_TARGET}.dvi)
# ENDIF (LATEX_DEFAULT_PDF OR LATEX_DEFAULT_SAFEPDF)
# END Removed by Florian Schoppmann

# Add commands and targets for building pdf outputs (with pdflatex).
IF (PDFLATEX_COMPILER)
Expand Down
1 change: 0 additions & 1 deletion doc/design/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ if(LATEX_BINARY AND BIBTEX_BINARY AND MAKEINDEX_BINARY)
modules/sampling.tex
modules/k-means.tex
modules/low-rank-matrix-decomposition.tex
DEFAULT_PDF
MANGLE_TARGET_NAMES
)
else()
Expand Down

0 comments on commit ed791a2

Please sign in to comment.