summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-08-28 20:28:35 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-08-28 20:28:35 +0000
commit7ed90880bc386f54f448a6b6e4c5f0fa5da0e1cb (patch)
treea1c844ca242f81a043d6ffc5d49f621783436d08
parent9cc5a452706d3b909b994813728a6094644f34b4 (diff)
downloadbcm5719-llvm-7ed90880bc386f54f448a6b6e4c5f0fa5da0e1cb.tar.gz
bcm5719-llvm-7ed90880bc386f54f448a6b6e4c5f0fa5da0e1cb.zip
[doxygen] Added support for doxygen external search.
llvm-svn: 189507
-rwxr-xr-xllvm/cmake/config-ix.cmake2
-rw-r--r--llvm/docs/CMakeLists.txt25
-rw-r--r--llvm/docs/Makefile6
-rw-r--r--llvm/docs/doxygen.cfg.in11
4 files changed, 41 insertions, 3 deletions
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
index 3f57e23a6f3..1f82557136d 100755
--- a/llvm/cmake/config-ix.cmake
+++ b/llvm/cmake/config-ix.cmake
@@ -473,6 +473,8 @@ if (LLVM_ENABLE_DOXYGEN)
if (LLVM_BUILD_DOCS)
add_custom_target(doxygen ALL)
endif()
+ option(DOXYGEN_EXTERNAL_SEARCH "Enable doxygen external search." OFF)
+ set(DOXYGEN_SEARCH_MAPPINGS "" CACHE STRING "Doxygen Search Mappings")
endif()
else()
message(STATUS "Doxygen disabled.")
diff --git a/llvm/docs/CMakeLists.txt b/llvm/docs/CMakeLists.txt
index 7f1a51f17a4..7e9cc6beeab 100644
--- a/llvm/docs/CMakeLists.txt
+++ b/llvm/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)
diff --git a/llvm/docs/Makefile b/llvm/docs/Makefile
index 122c4b834bb..e830a3235ad 100644
--- a/llvm/docs/Makefile
+++ b/llvm/docs/Makefile
@@ -19,7 +19,11 @@ $(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg.in
-e 's/@abs_top_srcdir@/../g' \
-e 's/@DOT@/dot/g' \
-e 's/@PACKAGE_VERSION@/mainline/' \
- -e 's/@abs_top_builddir@/../g' > $@
+ -e 's/@abs_top_builddir@/../g' \
+ -e 's/@enable_searchengine@/NO/g' \
+ -e 's/@enable_server_based_search@/NO/g' \
+ -e 's/@enable_external_search@/NO/g' \
+ -e 's/@extra_search_mappings@/NO/g' > $@
endif
include $(LEVEL)/Makefile.common
diff --git a/llvm/docs/doxygen.cfg.in b/llvm/docs/doxygen.cfg.in
index 20de0773f40..25614cd6700 100644
--- a/llvm/docs/doxygen.cfg.in
+++ b/llvm/docs/doxygen.cfg.in
@@ -1,3 +1,4 @@
+
# Doxyfile 1.7.1
# This file describes the settings to be used by the documentation system
@@ -1068,7 +1069,7 @@ FORMULA_TRANSPARENT = YES
# typically be disabled. For large projects the javascript based search engine
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-SEARCHENGINE = NO
+SEARCHENGINE = @enable_searchengine@
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a PHP enabled web server instead of at the web client
@@ -1078,7 +1079,13 @@ SEARCHENGINE = NO
# full text search. The disadvances is that it is more difficult to setup
# and does not have live searching capabilities.
-SERVER_BASED_SEARCH = NO
+SERVER_BASED_SEARCH = @enable_server_based_search@
+
+EXTERNAL_SEARCH = @enable_external_search@
+
+EXTERNAL_SEARCH_ID = llvm
+
+EXTRA_SEARCH_MAPPINGS = @extra_search_mappings@
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
OpenPOWER on IntegriCloud