Commit 221f000b authored by Simone Deparis's avatar Simone Deparis
Browse files

Copying CMakeList from CodingGuidelines and adapting. Probably needs...

Copying CMakeList from CodingGuidelines and adapting. Probably needs improvements, in particular for the dependency on the BIBFILES
parent 125f0ed2
......@@ -39,4 +39,6 @@ IF(PDFLATEX_COMPILER)
ADD_SUBDIRECTORY(CodingGuidelines)
ADD_SUBDIRECTORY(manual)
ENDIF()
add_custom_target (manual_links
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/../tex/lifestyle.cls;lifestyle.cls
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/../tex/rcs.sty;rcs.sty
VERBATIM)
add_latex_document (lifev-manual.tex
INPUTS lifev-manual.tex lifev-install.tex lifev-examples.tex cavity.tex navierstokes.tex fsi.tex BCCond.fig BCHandler.fig BasElSha.fig Fem_nodes.fig mixed_pattern.fig theFE.fig BCCond.eps BasElSha.eps NSCode_mesh_types.eps theFE.eps BCHandler.eps Fem_nodes.eps mixed_pattern.eps BCCond.pdf BasElSha.pdf NSCode_mesh_types.pdf theFE.pdf BCHandler.pdf Fem_nodes.pdf mixed_pattern.pdf cavityFigure.pdf_t cavityFigure.pdf ALEmapping.pdf
BIBFILES ../tex/lifev.bib
DEFAULT_PDF
MANGLE_TARGET_NAMES
USE_INDEX)
add_latex_document (lifev-dev.tex
INPUTS lifev-dev.tex lifev-install.tex lifev-examples.tex lifev-dev_conventions.tex lifev-dev_overview.tex lifev-dev_howto.tex BCCond.fig BCHandler.fig BasElSha.fig Fem_nodes.fig mixed_pattern.fig theFE.fig BCCond.eps BasElSha.eps NSCode_mesh_types.eps theFE.eps BCHandler.eps Fem_nodes.eps mixed_pattern.eps BCCond.pdf BasElSha.pdf NSCode_mesh_types.pdf theFE.pdf BCHandler.pdf Fem_nodes.pdf mixed_pattern.pdf cavityFigure.pdf_t cavityFigure.pdf ALEmapping.pdf
BIBFILES ../tex/lifev.bib
DEFAULT_PDF
MANGLE_TARGET_NAMES
USE_INDEX)
add_custom_target (manual)
add_custom_target (dev-guide)
add_dependencies (manual DEPENDS lifev-manual_pdf)
add_dependencies (dev-guide DEPENDS lifev-dev_pdf)
add_dependencies (lifev-manual_pdf DEPENDS manual_links)
add_dependencies (lifev-dev_pdf DEPENDS manual_links)
SET(TEX_FILES
lifev-manual
lifev-dev
)
SET(FILES_lifev-manual
lifev-manual.tex lifev-install.tex lifev-examples.tex cavity.tex navierstokes.tex fsi.tex BCCond.fig BCHandler.fig BasElSha.fig Fem_nodes.fig mixed_pattern.fig theFE.fig BCCond.eps BasElSha.eps NSCode_mesh_types.eps theFE.eps BCHandler.eps Fem_nodes.eps mixed_pattern.eps BCCond.pdf BasElSha.pdf NSCode_mesh_types.pdf theFE.pdf BCHandler.pdf Fem_nodes.pdf mixed_pattern.pdf cavityFigure.pdf_t cavityFigure.pdf ALEmapping.pdf
)
SET(FILES_lifev-dev
lifev-dev.tex lifev-install.tex lifev-examples.tex lifev-dev_conventions.tex lifev-dev_overview.tex lifev-dev_howto.tex BCCond.fig BCHandler.fig BasElSha.fig Fem_nodes.fig mixed_pattern.fig theFE.fig BCCond.eps BasElSha.eps NSCode_mesh_types.eps theFE.eps BCHandler.eps Fem_nodes.eps mixed_pattern.eps BCCond.pdf BasElSha.pdf NSCode_mesh_types.pdf theFE.pdf BCHandler.pdf Fem_nodes.pdf mixed_pattern.pdf cavityFigure.pdf_t cavityFigure.pdf ALEmapping.pdf
)
SET(BIB_FILES
../tex/lifev.bib
)
CONFIGURE_FILE(ltxcompile.cmake
ltxcompile @ONLY)
FOREACH(TEX_FILE ${TEX_FILES})
ADD_CUSTOM_TARGET(pdf_${TEX_FILE} echo
DEPENDS ${TEX_FILE}.pdf
)
ADD_DEPENDENCIES(pdf pdf_${TEX_FILE})
ADD_CUSTOM_COMMAND(
OUTPUT ${TEX_FILE}.pdf
COMMAND /bin/sh ltxcompile
ARGS ${TEX_FILE}.tex
DEPENDS ${FILES_${TEX_FILE}} ${BIB_FILES}
)
INSTALL(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.pdf
DESTINATION share/doc/lifev
COMPONENT doc
OPTIONAL
)
ENDFOREACH()
......@@ -14,13 +14,13 @@ showlog(){
}
trap "showlog" 1 2 3 4 5 6 7 8 9 10 11
export TEXINPUTS=$srcdir:$top_srcdir/doc/tex//:$TEXINPUTS
export BIBINPUTS=$BIBINPUTS:$srcdir:$top_srcdir/doc/tex//:$BIBINPUTS
export TEXINPUTS=@CMAKE_CURRENT_SOURCE_DIR@:@CMAKE_SOURCE_DIR@/doc/tex//:$TEXINPUTS
export BIBINPUTS=@CMAKE_CURRENT_SOURCE_DIR@:@CMAKE_SOURCE_DIR@/doc/tex//:$BIBINPUTS
echo export TEXINPUTS=$TEXINPUTS | tee $logfile
echo export BIBINPUTS=$BIBINPUTS | tee -a $logfile
prefix=`basename $1 .tex`
prefix=`basename $1 .tex`
#ltxcmdlines="--interaction nonstopmode --file-line-error-style"
ltxcmdlines="--interaction nonstopmode"
......@@ -33,3 +33,4 @@ makeindex $prefix | tee -a $logfile
pdflatex $ltxcmdlines $prefix | tee -a $logfile
pdflatex $ltxcmdlines $prefix | tee -a $logfile
rm -f $prefix.aux $prefix.bbl $prefix.blg $prefix.log $prefix.out
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment