From 092dc057f7b73a7efd09b906e894dc03bf2604fd Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Wed, 2 Dec 2015 20:41:30 -0500 Subject: [PATCH] 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 --- CMakeLists.txt | 7 +++++++ cmake/UseLATEX.cmake | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 860a6eed..72279cfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,13 @@ enable_testing() 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) 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") diff --git a/cmake/UseLATEX.cmake b/cmake/UseLATEX.cmake index 89d1fa10..bb6468f9 100644 --- a/cmake/UseLATEX.cmake +++ b/cmake/UseLATEX.cmake @@ -658,7 +658,8 @@ function(latex_setup_variables) endif() 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.") set(PDFLATEX_COMPILER_FLAGS ${LATEX_COMPILER_FLAGS} CACHE STRING "Flags passed to pdflatex.")