[llvm] Export `LLVM_VERSION_*` CMake variables to `PARENT_SCOPE` (PR #83346)

Benoit Jacob via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 19:28:39 PST 2024


================
@@ -28,6 +28,15 @@ if(NOT DEFINED LLVM_VERSION_SUFFIX)
   set(LLVM_VERSION_SUFFIX git)
 endif()
 
+# Export a few LLVM version identifiers for users who use LLVM as a subdir.
----------------
bjacob wrote:

i don't know where the canonical source is, but here is some copy of FindLLVM.cmake with comment answering that: <https://github.com/ldc-developers/ldc/blob/master/cmake/Modules/FindLLVM.cmake#L7-L25>

I'm not sure I want to export all these variables I had never heard of, and conversely, this doesn't mention `LLVM_VERSION_SUFFIX`.

How about I just restrict this PR to just `LLVM_VERSION_MAJOR` ?

https://github.com/llvm/llvm-project/pull/83346


More information about the llvm-commits mailing list