summaryrefslogtreecommitdiffstats
path: root/Modules/FindDoxygen.cmake
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2019-01-26 23:34:05 (GMT)
committerCraig Scott <craig.scott@crascit.com>2019-01-26 23:34:05 (GMT)
commite81fd5d5ba24e46a3a27c6a4e061932cf2022ef2 (patch)
tree64939569a24526d231ea9efc5cdf51550cddfe00 /Modules/FindDoxygen.cmake
parent8887ebc69b86606b388272d5c89ce11753bb4804 (diff)
downloadCMake-e81fd5d5ba24e46a3a27c6a4e061932cf2022ef2.zip
CMake-e81fd5d5ba24e46a3a27c6a4e061932cf2022ef2.tar.gz
CMake-e81fd5d5ba24e46a3a27c6a4e061932cf2022ef2.tar.bz2
FindDoxygen: Escape backslashes in default values
Doxygen 1.8.15 added a new LATEX_MAKEINDEX_CMD config item and it has a default value that contains a backslash on some installations. Fixes: #18738
Diffstat (limited to 'Modules/FindDoxygen.cmake')
-rw-r--r--Modules/FindDoxygen.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake
index 2ed9449..cb4738b 100644
--- a/Modules/FindDoxygen.cmake
+++ b/Modules/FindDoxygen.cmake
@@ -708,7 +708,9 @@ if(TARGET Doxygen::doxygen)
if(_line MATCHES "([A-Z][A-Z0-9_]+)( *=)(.*)")
set(_key "${CMAKE_MATCH_1}")
set(_eql "${CMAKE_MATCH_2}")
- string(REPLACE ";" "\\\n" _value "${CMAKE_MATCH_3}")
+ set(_value "${CMAKE_MATCH_3}")
+ string(REPLACE "\\" "\\\\" _value "${_value}")
+ string(REPLACE ";" "\\\n" _value "${_value}")
list(APPEND _Doxygen_tpl_params "${_key}${_eql}${_value}")
endif()
endforeach()