diff options
author | Peter Zotov <whitequark@whitequark.org> | 2014-12-01 19:50:23 +0000 |
---|---|---|
committer | Peter Zotov <whitequark@whitequark.org> | 2014-12-01 19:50:23 +0000 |
commit | a0a26f222bb4ac0b6cf52fd4bbce6f2ad63a4321 (patch) | |
tree | 195b343c8e54a2cff0bcc1de853ed9adca9ebb30 /bindings | |
parent | f97b79e09e1cbefe1934f8f9fa43ed77cd9b363a (diff) | |
download | llvm-a0a26f222bb4ac0b6cf52fd4bbce6f2ad63a4321.tar.gz |
[OCaml] [cmake] Add CMake buildsystem for OCaml.
Closes PR15325.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/ocaml/CMakeLists.txt | 11 | ||||
-rw-r--r-- | bindings/ocaml/all_backends/CMakeLists.txt | 5 | ||||
-rw-r--r-- | bindings/ocaml/analysis/CMakeLists.txt | 5 | ||||
-rw-r--r-- | bindings/ocaml/backends/CMakeLists.txt | 27 | ||||
-rw-r--r-- | bindings/ocaml/bitreader/CMakeLists.txt | 5 | ||||
-rw-r--r-- | bindings/ocaml/bitwriter/CMakeLists.txt | 5 | ||||
-rw-r--r-- | bindings/ocaml/executionengine/CMakeLists.txt | 6 | ||||
-rw-r--r-- | bindings/ocaml/irreader/CMakeLists.txt | 5 | ||||
-rw-r--r-- | bindings/ocaml/linker/CMakeLists.txt | 5 | ||||
-rw-r--r-- | bindings/ocaml/llvm/CMakeLists.txt | 11 | ||||
-rw-r--r-- | bindings/ocaml/target/CMakeLists.txt | 5 | ||||
-rw-r--r-- | bindings/ocaml/transforms/CMakeLists.txt | 4 | ||||
-rw-r--r-- | bindings/ocaml/transforms/ipo/CMakeLists.txt | 5 | ||||
-rw-r--r-- | bindings/ocaml/transforms/passmgr_builder/CMakeLists.txt | 5 | ||||
-rw-r--r-- | bindings/ocaml/transforms/scalar_opts/CMakeLists.txt | 5 | ||||
-rw-r--r-- | bindings/ocaml/transforms/vectorize/CMakeLists.txt | 5 |
16 files changed, 114 insertions, 0 deletions
diff --git a/bindings/ocaml/CMakeLists.txt b/bindings/ocaml/CMakeLists.txt new file mode 100644 index 000000000000..20583682c3d7 --- /dev/null +++ b/bindings/ocaml/CMakeLists.txt @@ -0,0 +1,11 @@ +add_subdirectory(llvm) +add_subdirectory(all_backends) +add_subdirectory(analysis) +add_subdirectory(backends) +add_subdirectory(bitreader) +add_subdirectory(bitwriter) +add_subdirectory(irreader) +add_subdirectory(linker) +add_subdirectory(target) +add_subdirectory(transforms) +add_subdirectory(executionengine) diff --git a/bindings/ocaml/all_backends/CMakeLists.txt b/bindings/ocaml/all_backends/CMakeLists.txt new file mode 100644 index 000000000000..716a49cc3281 --- /dev/null +++ b/bindings/ocaml/all_backends/CMakeLists.txt @@ -0,0 +1,5 @@ +add_ocaml_library(llvm_all_backends + OCAML llvm_all_backends + OCAMLDEP llvm + C all_backends_ocaml + LLVM ${LLVM_TARGETS_TO_BUILD}) diff --git a/bindings/ocaml/analysis/CMakeLists.txt b/bindings/ocaml/analysis/CMakeLists.txt new file mode 100644 index 000000000000..f8ca84ddbe33 --- /dev/null +++ b/bindings/ocaml/analysis/CMakeLists.txt @@ -0,0 +1,5 @@ +add_ocaml_library(llvm_analysis + OCAML llvm_analysis + OCAMLDEP llvm + C analysis_ocaml + LLVM analysis) diff --git a/bindings/ocaml/backends/CMakeLists.txt b/bindings/ocaml/backends/CMakeLists.txt new file mode 100644 index 000000000000..b660c1d66dd1 --- /dev/null +++ b/bindings/ocaml/backends/CMakeLists.txt @@ -0,0 +1,27 @@ +foreach(TARGET ${LLVM_TARGETS_TO_BUILD}) + set(OCAML_LLVM_TARGET ${TARGET}) + + foreach( ext ml mli ) + configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/llvm_backend.${ext}.in" + "${CMAKE_CURRENT_BINARY_DIR}/llvm_${TARGET}.${ext}") + endforeach() + + configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/backend_ocaml.c" + "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_ocaml.c") + + add_ocaml_library(llvm_${TARGET} + OCAML llvm_${TARGET} + C ${TARGET}_ocaml + CFLAGS -DTARGET=${TARGET} + LLVM ${TARGET} + NOCOPY) + + configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/META.llvm_backend.in" + "${LLVM_LIBRARY_OUTPUT_INTDIR}/ocaml/META.llvm_${TARGET}") + + install(FILES "${LLVM_LIBRARY_OUTPUT_INTDIR}/ocaml/META.llvm_${TARGET}" + DESTINATION lib/ocaml) +endforeach() diff --git a/bindings/ocaml/bitreader/CMakeLists.txt b/bindings/ocaml/bitreader/CMakeLists.txt new file mode 100644 index 000000000000..8d1610320e0e --- /dev/null +++ b/bindings/ocaml/bitreader/CMakeLists.txt @@ -0,0 +1,5 @@ +add_ocaml_library(llvm_bitreader + OCAML llvm_bitreader + OCAMLDEP llvm + C bitreader_ocaml + LLVM bitreader) diff --git a/bindings/ocaml/bitwriter/CMakeLists.txt b/bindings/ocaml/bitwriter/CMakeLists.txt new file mode 100644 index 000000000000..5a14498cb07e --- /dev/null +++ b/bindings/ocaml/bitwriter/CMakeLists.txt @@ -0,0 +1,5 @@ +add_ocaml_library(llvm_bitwriter + OCAML llvm_bitwriter + OCAMLDEP llvm + C bitwriter_ocaml + LLVM bitwriter) diff --git a/bindings/ocaml/executionengine/CMakeLists.txt b/bindings/ocaml/executionengine/CMakeLists.txt new file mode 100644 index 000000000000..ae9af088c025 --- /dev/null +++ b/bindings/ocaml/executionengine/CMakeLists.txt @@ -0,0 +1,6 @@ +add_ocaml_library(llvm_executionengine + OCAML llvm_executionengine + OCAMLDEP llvm llvm_target + C executionengine_ocaml + LLVM executionengine mcjit native + PKG ctypes) diff --git a/bindings/ocaml/irreader/CMakeLists.txt b/bindings/ocaml/irreader/CMakeLists.txt new file mode 100644 index 000000000000..87d269b48c7a --- /dev/null +++ b/bindings/ocaml/irreader/CMakeLists.txt @@ -0,0 +1,5 @@ +add_ocaml_library(llvm_irreader + OCAML llvm_irreader + OCAMLDEP llvm + C irreader_ocaml + LLVM irreader) diff --git a/bindings/ocaml/linker/CMakeLists.txt b/bindings/ocaml/linker/CMakeLists.txt new file mode 100644 index 000000000000..b6bc8ac1e830 --- /dev/null +++ b/bindings/ocaml/linker/CMakeLists.txt @@ -0,0 +1,5 @@ +add_ocaml_library(llvm_linker + OCAML llvm_linker + OCAMLDEP llvm + C linker_ocaml + LLVM linker) diff --git a/bindings/ocaml/llvm/CMakeLists.txt b/bindings/ocaml/llvm/CMakeLists.txt new file mode 100644 index 000000000000..0d0fe3bd083b --- /dev/null +++ b/bindings/ocaml/llvm/CMakeLists.txt @@ -0,0 +1,11 @@ +add_ocaml_library(llvm + OCAML llvm + C llvm_ocaml + LLVM core transformutils support) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/META.llvm.in" + "${LLVM_LIBRARY_OUTPUT_INTDIR}/ocaml/META.llvm") + +install(FILES "${LLVM_LIBRARY_OUTPUT_INTDIR}/ocaml/META.llvm" + DESTINATION lib/ocaml) diff --git a/bindings/ocaml/target/CMakeLists.txt b/bindings/ocaml/target/CMakeLists.txt new file mode 100644 index 000000000000..adee0fcec659 --- /dev/null +++ b/bindings/ocaml/target/CMakeLists.txt @@ -0,0 +1,5 @@ +add_ocaml_library(llvm_target + OCAML llvm_target + OCAMLDEP llvm + C target_ocaml + LLVM target) diff --git a/bindings/ocaml/transforms/CMakeLists.txt b/bindings/ocaml/transforms/CMakeLists.txt new file mode 100644 index 000000000000..8693ffb6ae21 --- /dev/null +++ b/bindings/ocaml/transforms/CMakeLists.txt @@ -0,0 +1,4 @@ +add_subdirectory(ipo) +add_subdirectory(passmgr_builder) +add_subdirectory(scalar_opts) +add_subdirectory(vectorize) diff --git a/bindings/ocaml/transforms/ipo/CMakeLists.txt b/bindings/ocaml/transforms/ipo/CMakeLists.txt new file mode 100644 index 000000000000..4b8784fad67b --- /dev/null +++ b/bindings/ocaml/transforms/ipo/CMakeLists.txt @@ -0,0 +1,5 @@ +add_ocaml_library(llvm_ipo + OCAML llvm_ipo + OCAMLDEP llvm + C ipo_ocaml + LLVM ipo) diff --git a/bindings/ocaml/transforms/passmgr_builder/CMakeLists.txt b/bindings/ocaml/transforms/passmgr_builder/CMakeLists.txt new file mode 100644 index 000000000000..b012863d8ec7 --- /dev/null +++ b/bindings/ocaml/transforms/passmgr_builder/CMakeLists.txt @@ -0,0 +1,5 @@ +add_ocaml_library(llvm_passmgr_builder + OCAML llvm_passmgr_builder + OCAMLDEP llvm + C passmgr_builder_ocaml + LLVM ipo) diff --git a/bindings/ocaml/transforms/scalar_opts/CMakeLists.txt b/bindings/ocaml/transforms/scalar_opts/CMakeLists.txt new file mode 100644 index 000000000000..98c7c6861d2b --- /dev/null +++ b/bindings/ocaml/transforms/scalar_opts/CMakeLists.txt @@ -0,0 +1,5 @@ +add_ocaml_library(llvm_scalar_opts + OCAML llvm_scalar_opts + OCAMLDEP llvm + C scalar_opts_ocaml + LLVM scalaropts) diff --git a/bindings/ocaml/transforms/vectorize/CMakeLists.txt b/bindings/ocaml/transforms/vectorize/CMakeLists.txt new file mode 100644 index 000000000000..af0ffce563f6 --- /dev/null +++ b/bindings/ocaml/transforms/vectorize/CMakeLists.txt @@ -0,0 +1,5 @@ +add_ocaml_library(llvm_vectorize + OCAML llvm_vectorize + OCAMLDEP llvm + C vectorize_ocaml + LLVM vectorize) |