From cb6b8937b6b559efe0b9a66b05c3ea3bcfcfad1c Mon Sep 17 00:00:00 2001 From: Antoine Date: Mon, 14 Sep 2020 20:21:42 -0400 Subject: [PATCH] Partially reverted code that was commented in error. --- CMakeLists.txt | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a11cad0e..d0d9be87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -223,25 +223,25 @@ endif() set (README_FILENAME README.md) set (USERMANUAL_FILENAME UserManual.md) -# if (GRIP_FOUND) -# # Convert README.md -# execute_process(COMMAND grip README.md --export README.html --user-content --context=end2endzone/ShellAnything RESULT_VARIABLE res_var WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -# if("${res_var}" STREQUAL "0") -# set (README_FILENAME README.html) -# else() -# message(FATAL_ERROR "grip failed converting README.md with res_var='${res_var}'") -# endif() -# -# # Convert UserManual.md -# execute_process(COMMAND grip UserManual.md --export UserManual.html --user-content --context=end2endzone/ShellAnything RESULT_VARIABLE res_var WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -# if("${res_var}" STREQUAL "0") -# set (USERMANUAL_FILENAME UserManual.html) -# else() -# message(FATAL_ERROR "grip failed converting UserManual.md with res_var='${res_var}'") -# endif() -# else() -# message(WARNING "grip is not found on the system. grip is required for publishing markdown files to html. Files will be published as *.md files.") -# endif() +if (GRIP_FOUND) + # Convert README.md + execute_process(COMMAND grip README.md --export README.html --user-content --context=end2endzone/ShellAnything RESULT_VARIABLE res_var WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + if("${res_var}" STREQUAL "0") + set (README_FILENAME README.html) + else() + message(FATAL_ERROR "grip failed converting README.md with res_var='${res_var}'") + endif() + + # Convert UserManual.md + execute_process(COMMAND grip UserManual.md --export UserManual.html --user-content --context=end2endzone/ShellAnything RESULT_VARIABLE res_var WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + if("${res_var}" STREQUAL "0") + set (USERMANUAL_FILENAME UserManual.html) + else() + message(FATAL_ERROR "grip failed converting UserManual.md with res_var='${res_var}'") + endif() +else() + message(WARNING "grip is not found on the system. grip is required for publishing markdown files to html. Files will be published as *.md files.") +endif() ##############################################################################################################################################