llvm.org GIT mirror llvm / 4cff093
[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 Michael Gottesman 6 years ago
4 changed file(s) with 28 addition(s) and 26 deletion(s). Raw diff Collapse all Expand all
472472 if (LLVM_BUILD_DOCS)
473473 add_custom_target(doxygen ALL)
474474 endif()
475 option(DOXYGEN_EXTERNAL_SEARCH "Enable doxygen external search." OFF)
476 set(DOXYGEN_SEARCH_MAPPINGS "" CACHE STRING "Doxygen Search Mappings")
475
476 option(LLVM_DOXYGEN_EXTERNAL_SEARCH "Enable doxygen external search." OFF)
477 if (LLVM_DOXYGEN_EXTERNAL_SEARCH)
478 set(LLVM_DOXYGEN_SEARCHENGINE_URL "" CACHE STRING "URL to use for external searhc.")
479 set(LLVM_DOXYGEN_SEARCH_MAPPINGS "" CACHE STRING "Doxygen Search Mappings")
480 endif()
477481 endif()
478482 else()
479483 message(STATUS "Doxygen disabled.")
77 set(DOT ${LLVM_PATH_DOT})
88 endif()
99
10 if (DOXYGEN_EXTERNAL_SEARCH)
11 set(SEARCHENGINE "YES")
12 set(SERVER_BASED_SEARCH "YES")
13 set(EXTERNAL_SEARCH "YES")
14
15 set(EXTRA_SEARCH_MAPPINGS "")
16 foreach(NameAndValue ${DOXYGEN_SEARCH_MAPPINGS})
17 # Strip leading spaces
18 string(REGEX REPLACE "^[ ]+" "" NameAndValue ${NameAndValue})
19 # Find variable name
20 string(REGEX MATCH "^[^=]+" Name ${NameAndValue})
21 # Find the value
22 string(REPLACE "${Name}=" "" Value ${NameAndValue})
23 # Set the variable
24 if (NOT ${Name} EQUALS llvm)
25 set(EXTRA_SEARCH_MAPPINGS "${EXTRA_SEARCH_MAPPINGS} ${LLVM_BINARY_DIR}/${NameAndValue}")
26 endif()
27 endforeach()
10 if (LLVM_DOXYGEN_EXTERNAL_SEARCH)
11 set(enable_searchengine "YES")
12 set(searchengine_url "${LLVM_DOXYGEN_SEARCHENGINE_URL}")
13 set(enable_server_based_search "YES")
14 set(enable_external_search "YES")
15 set(extra_search_mappings "${LLVM_DOXYGEN_SEARCH_MAPPINGS}")
2816 else()
29 set(SEARCHENGINE "NO")
30 set(SERVER_BASED_SEARCH "NO")
31 set(EXTERNAL_SEARCH "NO")
32 set(EXTRA_SEARCH_MAPPINGS "")
17 set(enable_searchengine "NO")
18 set(searchengine_url "")
19 set(enable_server_based_search "NO")
20 set(enable_external_search "NO")
21 set(extra_search_mappings "")
3322 endif()
3423
3524 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
3625 ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
26
3727 set(abs_top_srcdir)
3828 set(abs_top_builddir)
3929 set(DOT)
30 set(enable_searchengine)
31 set(searchengine_url)
32 set(enable_server_based_search)
33 set(enable_external_search)
34 set(extra_search_mappings)
4035
4136 add_custom_target(doxygen-llvm
4237 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
2020 -e 's/@PACKAGE_VERSION@/mainline/' \
2121 -e 's/@abs_top_builddir@/../g' \
2222 -e 's/@enable_searchengine@/NO/g' \
23 -e 's/@enable_server_based_search@/NO/g' \
23 -e 's/@searchengine_url@//g' \
24 -e 's/@enable_server_based_search@/NO/g' \
2425 -e 's/@enable_external_search@/NO/g' \
25 -e 's/@extra_search_mappings@/NO/g' > $@
26 -e 's/@extra_search_mappings@//g' > $@
2627 endif
2728
2829 include $(LEVEL)/Makefile.common
10791079 # and does not have live searching capabilities.
10801080
10811081 SERVER_BASED_SEARCH = @enable_server_based_search@
1082
1083 SEARCHENGINE_URL = @searchengine_url@
10821084
10831085 EXTERNAL_SEARCH = @enable_external_search@
10841086