Add an option to build the GLM manual

- Also modify UseLATEX.cmake a bit because CMake is a pain
- Add -shell-escape flag, but remove -interaction=nonstopmode flag
- I hope this doesn't become a problem
This commit is contained in:
Jesse Talavera-Greenberg 2015-12-02 20:41:30 -05:00
parent b7e3c1be2b
commit 092dc057f7
2 changed files with 9 additions and 1 deletions

View File

@ -12,6 +12,13 @@ enable_testing()
add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_SECURE_NO_WARNINGS)
option(GLM_BUILD_MANUAL_ENABLE "Build GLM manual" OFF)
if(GLM_BUILD_MANUAL_ENABLE)
set(LATEX_OUTPUT_PATH "doc")
include(UseLATEX)
add_latex_document("doc/glm.tex" TARGET_NAME manual)
endif()
option(GLM_TEST_ENABLE "GLM test" OFF) option(GLM_TEST_ENABLE "GLM test" OFF)
if(NOT GLM_TEST_ENABLE) if(NOT GLM_TEST_ENABLE)
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench") message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench")

View File

@ -658,7 +658,8 @@ function(latex_setup_variables)
endif() endif()
latex_wantit(LATEX2HTML_CONVERTER latex2html) latex_wantit(LATEX2HTML_CONVERTER latex2html)
set(LATEX_COMPILER_FLAGS "-interaction=nonstopmode" # HACK: Make it easier to actually build the GLM manual; pray this doesn't become an issue
set(LATEX_COMPILER_FLAGS "-shell-escape"
CACHE STRING "Flags passed to latex.") CACHE STRING "Flags passed to latex.")
set(PDFLATEX_COMPILER_FLAGS ${LATEX_COMPILER_FLAGS} set(PDFLATEX_COMPILER_FLAGS ${LATEX_COMPILER_FLAGS}
CACHE STRING "Flags passed to pdflatex.") CACHE STRING "Flags passed to pdflatex.")