[llvm-branch-commits] [llvm] 3d913ec - [llvm] [cmake] Fix finding modern ounit2
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Feb 28 21:12:53 PST 2022
Author: Michał Górny
Date: 2022-02-28T21:11:17-08:00
New Revision: 3d913ec923083be7f8baeb3128849949e97b1f43
URL: https://github.com/llvm/llvm-project/commit/3d913ec923083be7f8baeb3128849949e97b1f43
DIFF: https://github.com/llvm/llvm-project/commit/3d913ec923083be7f8baeb3128849949e97b1f43.diff
LOG: [llvm] [cmake] Fix finding modern ounit2
Apparently modern versions of ounit2 can only be found as "ounit2"
rather than "oUnit" version 2. Update the CMake check to support both
variants. This makes the OCaml tests run again with ounit2-2.2.4.
Differential Revision: https://reviews.llvm.org/D119079
(cherry picked from commit 919dba9248f63d50e679ad5741d99ed8a8047227)
Added:
Modified:
llvm/cmake/config-ix.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
index a138d372d3b29..c70b8b3787a0a 100644
--- a/llvm/cmake/config-ix.cmake
+++ b/llvm/cmake/config-ix.cmake
@@ -650,7 +650,12 @@ else()
find_ocamlfind_package(ctypes VERSION 0.4 OPTIONAL)
if( HAVE_OCAML_CTYPES )
message(STATUS "OCaml bindings enabled.")
- find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
+ find_ocamlfind_package(ounit2 OPTIONAL)
+ if ( HAVE_OCAML_OUNIT2 )
+ set(HAVE_OCAML_OUNIT TRUE)
+ else()
+ find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
+ endif()
set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml")
set(LLVM_OCAML_INSTALL_PATH "${OCAML_STDLIB_PATH}" CACHE STRING
More information about the llvm-branch-commits
mailing list