[NFC][Py Reformat] Added more commits to .git-blame-ignore-revs
[llvm-project.git] / llvm / bindings / ocaml / backends / CMakeLists.txt
blob18d62a857381491689bfdae8d8b4900f7dd54998
1 foreach(TARGET ${LLVM_TARGETS_TO_BUILD})
2   set(OCAML_LLVM_TARGET ${TARGET})
4   foreach( ext ml mli )
5     configure_file(
6         "${CMAKE_CURRENT_SOURCE_DIR}/llvm_backend.${ext}.in"
7         "${CMAKE_CURRENT_BINARY_DIR}/llvm_${TARGET}.${ext}")
8   endforeach()
10   configure_file(
11     "${CMAKE_CURRENT_SOURCE_DIR}/backend_ocaml.c"
12     "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_ocaml.c")
14   add_ocaml_library(llvm_${TARGET}
15     OCAML    llvm_${TARGET}
16     C        ${TARGET}_ocaml
17     CFLAGS   -DTARGET=${TARGET}
18     LLVM     ${TARGET}
19     NOCOPY)
21   configure_file(
22     "${CMAKE_CURRENT_SOURCE_DIR}/META.llvm_backend.in"
23     "${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}")
25   install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}"
26           DESTINATION "${LLVM_OCAML_INSTALL_PATH}")
27 endforeach()