File tree Expand file tree Collapse file tree 4 files changed +41
-3
lines changed Expand file tree Collapse file tree 4 files changed +41
-3
lines changed Original file line number Diff line number Diff line change @@ -473,6 +473,8 @@ if (LLVM_ENABLE_DOXYGEN)
473
473
if (LLVM_BUILD_DOCS )
474
474
add_custom_target (doxygen ALL )
475
475
endif ()
476
+ option (DOXYGEN_EXTERNAL_SEARCH "Enable doxygen external search." OFF )
477
+ set (DOXYGEN_SEARCH_MAPPINGS "" CACHE STRING "Doxygen Search Mappings" )
476
478
endif ()
477
479
else ()
478
480
message (STATUS "Doxygen disabled." )
Original file line number Diff line number Diff line change @@ -7,6 +7,31 @@ if (LLVM_ENABLE_DOXYGEN)
7
7
if (HAVE_DOT )
8
8
set (DOT ${LLVM_PATH_DOT} )
9
9
endif ()
10
+
11
+ if (DOXYGEN_EXTERNAL_SEARCH )
12
+ set (SEARCHENGINE "YES" )
13
+ set (SERVER_BASED_SEARCH "YES" )
14
+ set (EXTERNAL_SEARCH "YES" )
15
+
16
+ set (EXTRA_SEARCH_MAPPINGS "" )
17
+ foreach (NameAndValue ${DOXYGEN_SEARCH_MAPPINGS} )
18
+ # Strip leading spaces
19
+ string (REGEX REPLACE "^[ ]+" "" NameAndValue ${NameAndValue} )
20
+ # Find variable name
21
+ string (REGEX MATCH "^[^=]+" Name ${NameAndValue} )
22
+ # Find the value
23
+ string (REPLACE "${Name} =" "" Value ${NameAndValue} )
24
+ # Set the variable
25
+ if (NOT ${Name} EQUALS llvm )
26
+ set (EXTRA_SEARCH_MAPPINGS "${EXTRA_SEARCH_MAPPINGS} ${LLVM_BINARY_DIR} /${NameAndValue} " )
27
+ endif ()
28
+ endforeach ()
29
+ else ()
30
+ set (SEARCHENGINE "NO" )
31
+ set (SERVER_BASED_SEARCH "NO" )
32
+ set (EXTERNAL_SEARCH "NO" )
33
+ set (EXTRA_SEARCH_MAPPINGS "" )
34
+ endif ()
10
35
11
36
configure_file (${CMAKE_CURRENT_SOURCE_DIR} /doxygen.cfg.in
12
37
${CMAKE_CURRENT_BINARY_DIR} /doxygen.cfg @ONLY )
Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ $(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg.in
19
19
-e ' s/@abs_top_srcdir@/../g' \
20
20
-e ' s/@DOT@/dot/g' \
21
21
-e ' s/@PACKAGE_VERSION@/mainline/' \
22
- -e ' s/@abs_top_builddir@/../g' > $@
22
+ -e ' s/@abs_top_builddir@/../g' \
23
+ -e ' s/@enable_searchengine@/NO/g' \
24
+ -e 's/@enable_server_based_search@/NO/g' \
25
+ -e 's/@enable_external_search@/NO/g' \
26
+ -e 's/@extra_search_mappings@/NO/g' > $@
23
27
endif
24
28
25
29
include $(LEVEL ) /Makefile.common
Original file line number Diff line number Diff line change
1
+
1
2
# Doxyfile 1.7.1
2
3
3
4
# This file describes the settings to be used by the documentation system
@@ -1068,7 +1069,7 @@ FORMULA_TRANSPARENT = YES
1068
1069
# typically be disabled. For large projects the javascript based search engine
1069
1070
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
1070
1071
1071
- SEARCHENGINE = NO
1072
+ SEARCHENGINE = @enable_searchengine@
1072
1073
1073
1074
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1074
1075
# implemented using a PHP enabled web server instead of at the web client
@@ -1078,7 +1079,13 @@ SEARCHENGINE = NO
1078
1079
# full text search. The disadvances is that it is more difficult to setup
1079
1080
# and does not have live searching capabilities.
1080
1081
1081
- SERVER_BASED_SEARCH = NO
1082
+ SERVER_BASED_SEARCH = @enable_server_based_search@
1083
+
1084
+ EXTERNAL_SEARCH = @enable_external_search@
1085
+
1086
+ EXTERNAL_SEARCH_ID = llvm
1087
+
1088
+ EXTRA_SEARCH_MAPPINGS = @extra_search_mappings@
1082
1089
1083
1090
#---------------------------------------------------------------------------
1084
1091
# configuration options related to the LaTeX output
You can’t perform that action at this time.
0 commit comments