summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-08-28 21:55:26 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-08-28 21:55:26 +0000
commit4cff093bd6a1a474aff638f6ad32d56914c7488e (patch)
tree9599b625d8e7010fbce6f775499b05032627e44f
parent98b5be8062d33bde9a963c00326ce2483db18f9f (diff)
downloadllvm-4cff093bd6a1a474aff638f6ad32d56914c7488e.tar.gz
llvm-4cff093bd6a1a474aff638f6ad32d56914c7488e.tar.bz2
llvm-4cff093bd6a1a474aff638f6ad32d56914c7488e.tar.xz
[doxygen] Use correct variable names for external variable configuration and make EXTRA_SEARCH_MAPPINGS a "dumb" variable.
I do not think the massaging that I was doing for EXTRA_SEARCH_MAPPINGS was truly necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189522 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-xcmake/config-ix.cmake8
-rw-r--r--docs/CMakeLists.txt39
-rw-r--r--docs/Makefile5
-rw-r--r--docs/doxygen.cfg.in2
4 files changed, 28 insertions, 26 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 1f82557136..e8d18635f4 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -473,8 +473,12 @@ 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")
+
+ option(LLVM_DOXYGEN_EXTERNAL_SEARCH "Enable doxygen external search." OFF)
+ if (LLVM_DOXYGEN_EXTERNAL_SEARCH)
+ set(LLVM_DOXYGEN_SEARCHENGINE_URL "" CACHE STRING "URL to use for external searhc.")
+ set(LLVM_DOXYGEN_SEARCH_MAPPINGS "" CACHE STRING "Doxygen Search Mappings")
+ endif()
endif()
else()
message(STATUS "Doxygen disabled.")
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 7e9cc6beea..8c49aa5e5f 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -8,36 +8,31 @@ if (LLVM_ENABLE_DOXYGEN)
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()
+ if (LLVM_DOXYGEN_EXTERNAL_SEARCH)
+ set(enable_searchengine "YES")
+ set(searchengine_url "${LLVM_DOXYGEN_SEARCHENGINE_URL}")
+ set(enable_server_based_search "YES")
+ set(enable_external_search "YES")
+ set(extra_search_mappings "${LLVM_DOXYGEN_SEARCH_MAPPINGS}")
else()
- set(SEARCHENGINE "NO")
- set(SERVER_BASED_SEARCH "NO")
- set(EXTERNAL_SEARCH "NO")
- set(EXTRA_SEARCH_MAPPINGS "")
+ set(enable_searchengine "NO")
+ set(searchengine_url "")
+ set(enable_server_based_search "NO")
+ set(enable_external_search "NO")
+ set(extra_search_mappings "")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
+
set(abs_top_srcdir)
set(abs_top_builddir)
set(DOT)
+ set(enable_searchengine)
+ set(searchengine_url)
+ set(enable_server_based_search)
+ set(enable_external_search)
+ set(extra_search_mappings)
add_custom_target(doxygen-llvm
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
diff --git a/docs/Makefile b/docs/Makefile
index e830a3235a..502049174a 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -21,9 +21,10 @@ $(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg.in
-e 's/@PACKAGE_VERSION@/mainline/' \
-e 's/@abs_top_builddir@/../g' \
-e 's/@enable_searchengine@/NO/g' \
- -e 's/@enable_server_based_search@/NO/g' \
+ -e 's/@searchengine_url@//g' \
+ -e 's/@enable_server_based_search@/NO/g' \
-e 's/@enable_external_search@/NO/g' \
- -e 's/@extra_search_mappings@/NO/g' > $@
+ -e 's/@extra_search_mappings@//g' > $@
endif
include $(LEVEL)/Makefile.common
diff --git a/docs/doxygen.cfg.in b/docs/doxygen.cfg.in
index 25614cd670..0ed686b934 100644
--- a/docs/doxygen.cfg.in
+++ b/docs/doxygen.cfg.in
@@ -1081,6 +1081,8 @@ SEARCHENGINE = @enable_searchengine@
SERVER_BASED_SEARCH = @enable_server_based_search@
+SEARCHENGINE_URL = @searchengine_url@
+
EXTERNAL_SEARCH = @enable_external_search@
EXTERNAL_SEARCH_ID = llvm