aboutsummaryrefslogtreecommitdiffstats
path: root/docs/CMakeLists.txt
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2015-03-23 12:10:34 -0700
committerStephen Hines <srhines@google.com>2015-03-23 12:10:34 -0700
commitebe69fe11e48d322045d5949c83283927a0d790b (patch)
treec92f1907a6b8006628a4b01615f38264d29834ea /docs/CMakeLists.txt
parentb7d2e72b02a4cb8034f32f8247a2558d2434e121 (diff)
downloadexternal_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.zip
external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.gz
external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.bz2
Update aosp/master LLVM for rebase to r230699.
Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
Diffstat (limited to 'docs/CMakeLists.txt')
-rw-r--r--docs/CMakeLists.txt43
1 files changed, 43 insertions, 0 deletions
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index d310a0a..da27627 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -104,3 +104,46 @@ if (LLVM_ENABLE_SPHINX)
endif()
endif()
+
+list(FIND LLVM_BINDINGS_LIST ocaml uses_ocaml)
+if( NOT uses_ocaml LESS 0 )
+ set(doc_targets
+ ocaml_llvm
+ ocaml_llvm_all_backends
+ ocaml_llvm_analysis
+ ocaml_llvm_bitreader
+ ocaml_llvm_bitwriter
+ ocaml_llvm_executionengine
+ ocaml_llvm_irreader
+ ocaml_llvm_linker
+ ocaml_llvm_target
+ ocaml_llvm_ipo
+ ocaml_llvm_passmgr_builder
+ ocaml_llvm_scalar_opts
+ ocaml_llvm_transform_utils
+ ocaml_llvm_vectorize
+ )
+
+ foreach(llvm_target ${LLVM_TARGETS_TO_BUILD})
+ list(APPEND doc_targets ocaml_llvm_${llvm_target})
+ endforeach()
+
+ set(odoc_files)
+ foreach( doc_target ${doc_targets} )
+ get_target_property(odoc_file ${doc_target} OCAML_ODOC)
+ list(APPEND odoc_files -load ${odoc_file})
+ endforeach()
+
+ add_custom_target(ocaml_doc
+ COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
+ COMMAND ${OCAMLFIND} ocamldoc -d ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
+ -sort -colorize-code -html ${odoc_files})
+
+ add_dependencies(ocaml_doc ${doc_targets})
+
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
+ DESTINATION docs/ocaml/html)
+ endif()
+endif()