From 013c47b6224cddb8f2006c53a64e697e64d3f1f2 Mon Sep 17 00:00:00 2001
From: Virgile Prevosto <virgile.prevosto@m4x.org>
Date: Tue, 5 Sep 2023 19:28:33 +0200
Subject: [PATCH] [cmake] allow passing explicitely the name of the llvm-config
 executable to use

This will allow the opam package to export whatever conf-llvm has found, so that
we don't have to guess ourselves all the variations that some random
LLVM package manager has come up with at some point.
---
 framaCIRGen_src/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framaCIRGen_src/CMakeLists.txt b/framaCIRGen_src/CMakeLists.txt
index 847e961d..b4e9aa32 100644
--- a/framaCIRGen_src/CMakeLists.txt
+++ b/framaCIRGen_src/CMakeLists.txt
@@ -29,7 +29,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_EXTENSIONS OFF)
 
 find_program(LLVM_CONFIG
-  NAMES llvm-config llvm-config-15 llvm-config-14
+  NAMES $ENV{OPAM_LLVM_CONFIG} llvm-config llvm-config-15 llvm-config-14
         llvm-config-13 llvm-config-12 llvm-config-11
   REQUIRED)
 
-- 
GitLab