Skip to content

Commit 3d913ec

Browse files
mgornytstellar
authored andcommitted
[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 919dba9)
1 parent b3e9abd commit 3d913ec

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/cmake/config-ix.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,12 @@ else()
650650
find_ocamlfind_package(ctypes VERSION 0.4 OPTIONAL)
651651
if( HAVE_OCAML_CTYPES )
652652
message(STATUS "OCaml bindings enabled.")
653-
find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
653+
find_ocamlfind_package(ounit2 OPTIONAL)
654+
if ( HAVE_OCAML_OUNIT2 )
655+
set(HAVE_OCAML_OUNIT TRUE)
656+
else()
657+
find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
658+
endif()
654659
set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml")
655660

656661
set(LLVM_OCAML_INSTALL_PATH "${OCAML_STDLIB_PATH}" CACHE STRING

0 commit comments

Comments
 (0)