mi024

College project master 1 "Projet IAD"
git clone https://esimon.eu/repos/mi024.git
Log | Files | Refs | README

commit b077d82226d675e4283d4b182e27470c338e57e3
parent e3290403782873a96560a1fbc17810328eeec6c8
Author: Étienne Simon <etienne.jl.simon@gmail.com>
Date:   Sun, 17 Feb 2013 16:24:57 +0100

Compatibilité CMake (ajout de l'option VERBATIM.)

Diffstat:
Mcmake/UseLATEX.cmake | 25+++++++++++++++++++------
Mdoc/CMakeLists.txt | 2+-
2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/cmake/UseLATEX.cmake b/cmake/UseLATEX.cmake @@ -2,6 +2,7 @@ # CMAKE commands to actually use the LaTeX compiler # Version: 1.9.5 # Author: Kenneth Moreland <kmorel@sandia.gov> +# Modified by: Étienne Simon # # Copyright 2004 Sandia Corporation. # Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive @@ -70,6 +71,8 @@ # # History: # +# local Add VERBATIM to ADD_CUSTOM_* commands. +# # 1.9.5 Add support for image types not directly supported by either latex # or pdflatex. (Thanks to Jorge Gerardo Pena Pastor for SVG support.) # @@ -743,6 +746,7 @@ FUNCTION(LATEX_ADD_CONVERT_COMMAND COMMAND ${converter} ARGS ${convert_flags} ${input_path} ${output_path} DEPENDS ${input_path} + VERBATIM ) ENDFUNCTION(LATEX_ADD_CONVERT_COMMAND) @@ -785,6 +789,7 @@ FUNCTION(LATEX_CONVERT_IMAGE COMMAND ${CMAKE_COMMAND} ARGS -E copy ${input_dir}/${input_file} ${output_dir}/${input_file} DEPENDS ${input_dir}/${input_file} + VERBATIM ) SET(output_file_list ${output_file_list} ${output_dir}/${input_file}) ENDIF (convert_flags) @@ -889,12 +894,14 @@ FUNCTION(LATEX_COPY_INPUT_FILE file) COMMAND ${CMAKE_COMMAND} ARGS ${CMAKE_BINARY_DIR} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file} + VERBATIM ) ELSE (use_config) ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${file} COMMAND ${CMAKE_COMMAND} ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${file} ${output_dir}/${file} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file} + VERBATIM ) ENDIF (use_config) ELSE (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}) @@ -1187,13 +1194,14 @@ FUNCTION(ADD_LATEX_TARGETS_INTERNAL) ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${LATEX_TARGET}.dvi COMMAND ${make_dvi_command} DEPENDS ${make_dvi_depends} + VERBATIM ) IF (LATEX_DEFAULT_PDF OR LATEX_DEFAULT_SAFEPDF) ADD_CUSTOM_TARGET(${dvi_target} - DEPENDS ${output_dir}/${LATEX_TARGET}.dvi) + DEPENDS ${output_dir}/${LATEX_TARGET}.dvi VERBATIM) ELSE (LATEX_DEFAULT_PDF OR LATEX_DEFAULT_SAFEPDF) ADD_CUSTOM_TARGET(${dvi_target} ALL - DEPENDS ${output_dir}/${LATEX_TARGET}.dvi) + DEPENDS ${output_dir}/${LATEX_TARGET}.dvi VERBATIM) ENDIF (LATEX_DEFAULT_PDF OR LATEX_DEFAULT_SAFEPDF) # Add commands and targets for building pdf outputs (with pdflatex). @@ -1201,13 +1209,14 @@ FUNCTION(ADD_LATEX_TARGETS_INTERNAL) ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${LATEX_TARGET}.pdf COMMAND ${make_pdf_command} DEPENDS ${make_pdf_depends} + VERBATIM ) IF (LATEX_DEFAULT_PDF) ADD_CUSTOM_TARGET(${pdf_target} ALL - DEPENDS ${output_dir}/${LATEX_TARGET}.pdf) + DEPENDS ${output_dir}/${LATEX_TARGET}.pdf VERBATIM) ELSE (LATEX_DEFAULT_PDF) ADD_CUSTOM_TARGET(${pdf_target} - DEPENDS ${output_dir}/${LATEX_TARGET}.pdf) + DEPENDS ${output_dir}/${LATEX_TARGET}.pdf VERBATIM) ENDIF (LATEX_DEFAULT_PDF) ENDIF (PDFLATEX_COMPILER) @@ -1215,9 +1224,9 @@ FUNCTION(ADD_LATEX_TARGETS_INTERNAL) ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${LATEX_TARGET}.ps COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} ${DVIPS_CONVERTER} ${DVIPS_CONVERTER_FLAGS} -o ${LATEX_TARGET}.ps ${LATEX_TARGET}.dvi - DEPENDS ${output_dir}/${LATEX_TARGET}.dvi) + DEPENDS ${output_dir}/${LATEX_TARGET}.dvi VERBATIM) ADD_CUSTOM_TARGET(${ps_target} - DEPENDS ${output_dir}/${LATEX_TARGET}.ps) + DEPENDS ${output_dir}/${LATEX_TARGET}.ps VERBATIM) IF (PS2PDF_CONVERTER) # Since both the pdf and safepdf targets have the same output, we # cannot properly do the dependencies for both. When selecting safepdf, @@ -1226,11 +1235,13 @@ FUNCTION(ADD_LATEX_TARGETS_INTERNAL) ADD_CUSTOM_TARGET(${safepdf_target} ALL ${CMAKE_COMMAND} -E chdir ${output_dir} ${PS2PDF_CONVERTER} ${PS2PDF_CONVERTER_FLAGS} ${LATEX_TARGET}.ps ${LATEX_TARGET}.pdf + VERBATIM ) ELSE (LATEX_DEFAULT_SAFEPDF) ADD_CUSTOM_TARGET(${safepdf_target} ${CMAKE_COMMAND} -E chdir ${output_dir} ${PS2PDF_CONVERTER} ${PS2PDF_CONVERTER_FLAGS} ${LATEX_TARGET}.ps ${LATEX_TARGET}.pdf + VERBATIM ) ENDIF (LATEX_DEFAULT_SAFEPDF) ADD_DEPENDENCIES(${safepdf_target} ${ps_target}) @@ -1241,6 +1252,7 @@ FUNCTION(ADD_LATEX_TARGETS_INTERNAL) ADD_CUSTOM_TARGET(${html_target} ${CMAKE_COMMAND} -E chdir ${output_dir} ${LATEX2HTML_CONVERTER} ${LATEX2HTML_CONVERTER_FLAGS} ${LATEX_MAIN_INPUT} + VERBATIM ) ADD_DEPENDENCIES(${html_target} ${LATEX_MAIN_INPUT} ${LATEX_INPUTS}) ENDIF (LATEX2HTML_CONVERTER) @@ -1252,6 +1264,7 @@ FUNCTION(ADD_LATEX_TARGETS_INTERNAL) ADD_CUSTOM_TARGET(${auxclean_target} COMMENT "Cleaning auxiliary LaTeX files." COMMAND ${CMAKE_COMMAND} -E remove ${auxiliary_clean_files} + VERBATIM ) ENDFUNCTION(ADD_LATEX_TARGETS_INTERNAL) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt @@ -11,5 +11,5 @@ foreach(LATEX_DOCUMENT ${LATEX_DOCUMENTS}) add_latex_document(${LATEX_DOCUMENT} IMAGE_DIRS images DEFAULT_PDF MANGLE_TARGET_NAMES) get_filename_component(DOCUMENT ${LATEX_DOCUMENT} NAME_WE) add_dependencies(doc ${DOCUMENT}_pdf) - add_custom_command(TARGET ${DOCUMENT}_pdf POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${DOCUMENT}.pdf ${CMAKE_BINARY_DIR}/${DOCUMENT}.pdf) + add_custom_command(TARGET ${DOCUMENT}_pdf POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${DOCUMENT}.pdf ${CMAKE_BINARY_DIR}/${DOCUMENT}.pdf VERBATIM) endforeach(LATEX_DOCUMENT)