diff options
Diffstat (limited to 'docs/CMakeLists.txt')
-rw-r--r-- | docs/CMakeLists.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 7f1a51f17a..7e9cc6beea 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -7,6 +7,31 @@ if (LLVM_ENABLE_DOXYGEN) if (HAVE_DOT) set(DOT ${LLVM_PATH_DOT}) endif() + + if (DOXYGEN_EXTERNAL_SEARCH) + set(SEARCHENGINE "YES") + set(SERVER_BASED_SEARCH "YES") + set(EXTERNAL_SEARCH "YES") + + set(EXTRA_SEARCH_MAPPINGS "") + foreach(NameAndValue ${DOXYGEN_SEARCH_MAPPINGS}) + # Strip leading spaces + string(REGEX REPLACE "^[ ]+" "" NameAndValue ${NameAndValue}) + # Find variable name + string(REGEX MATCH "^[^=]+" Name ${NameAndValue}) + # Find the value + string(REPLACE "${Name}=" "" Value ${NameAndValue}) + # Set the variable + if (NOT ${Name} EQUALS llvm) + set(EXTRA_SEARCH_MAPPINGS "${EXTRA_SEARCH_MAPPINGS} ${LLVM_BINARY_DIR}/${NameAndValue}") + endif() + endforeach() + else() + set(SEARCHENGINE "NO") + set(SERVER_BASED_SEARCH "NO") + set(EXTERNAL_SEARCH "NO") + set(EXTRA_SEARCH_MAPPINGS "") + endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) |