comparison docs/CMakeLists.txt @ 83:60c9769439b8 LLVM3.7

LLVM 3.7
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Wed, 18 Feb 2015 14:55:36 +0900
parents 54457678186b
children afa8332a0e37
comparison
equal deleted inserted replaced
78:af83660cff7b 83:60c9769439b8
102 add_sphinx_target(man llvm) 102 add_sphinx_target(man llvm)
103 endif() 103 endif()
104 104
105 endif() 105 endif()
106 endif() 106 endif()
107
108 list(FIND LLVM_BINDINGS_LIST ocaml uses_ocaml)
109 if( NOT uses_ocaml LESS 0 )
110 set(doc_targets
111 ocaml_llvm
112 ocaml_llvm_all_backends
113 ocaml_llvm_analysis
114 ocaml_llvm_bitreader
115 ocaml_llvm_bitwriter
116 ocaml_llvm_executionengine
117 ocaml_llvm_irreader
118 ocaml_llvm_linker
119 ocaml_llvm_target
120 ocaml_llvm_ipo
121 ocaml_llvm_passmgr_builder
122 ocaml_llvm_scalar_opts
123 ocaml_llvm_transform_utils
124 ocaml_llvm_vectorize
125 )
126
127 foreach(llvm_target ${LLVM_TARGETS_TO_BUILD})
128 list(APPEND doc_targets ocaml_llvm_${llvm_target})
129 endforeach()
130
131 set(odoc_files)
132 foreach( doc_target ${doc_targets} )
133 get_target_property(odoc_file ${doc_target} OCAML_ODOC)
134 list(APPEND odoc_files -load ${odoc_file})
135 endforeach()
136
137 add_custom_target(ocaml_doc
138 COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
139 COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
140 COMMAND ${OCAMLFIND} ocamldoc -d ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
141 -sort -colorize-code -html ${odoc_files})
142
143 add_dependencies(ocaml_doc ${doc_targets})
144
145 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
146 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
147 DESTINATION docs/ocaml/html)
148 endif()
149 endif()