xref: /llvm-project/flang/cmake/modules/FlangConfigVersion.cmake.in (revision ecfa2d3d9943a48411d04a4b3103c42b4653d9af)
1*ecfa2d3dSThomas Preud'hommeset(PACKAGE_VERSION "@PACKAGE_VERSION@")
2*ecfa2d3dSThomas Preud'homme
3*ecfa2d3dSThomas Preud'homme# LLVM is API-compatible only with matching major.minor versions
4*ecfa2d3dSThomas Preud'homme# and patch versions not less than that requested.
5*ecfa2d3dSThomas Preud'hommeif("@LLVM_VERSION_MAJOR@.@LLVM_VERSION_MINOR@" VERSION_EQUAL
6*ecfa2d3dSThomas Preud'homme    "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}"
7*ecfa2d3dSThomas Preud'homme   AND NOT "@LLVM_VERSION_PATCH@" VERSION_LESS "${PACKAGE_FIND_VERSION_PATCH}")
8*ecfa2d3dSThomas Preud'homme  set(PACKAGE_VERSION_COMPATIBLE 1)
9*ecfa2d3dSThomas Preud'homme  if("@LLVM_VERSION_PATCH@" VERSION_EQUAL
10*ecfa2d3dSThomas Preud'homme      "${PACKAGE_FIND_VERSION_PATCH}")
11*ecfa2d3dSThomas Preud'homme    set(PACKAGE_VERSION_EXACT 1)
12*ecfa2d3dSThomas Preud'homme  endif()
13*ecfa2d3dSThomas Preud'hommeendif()
14