]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/intel-mkl/portfile.cmake
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / intel-mkl / portfile.cmake
1 # Due to the complexity involved, this package doesn't install MKL. It instead verifies that MKL is installed.
2 # Other packages can depend on this package to declare a dependency on MKL.
3 # If this package is installed, we assume that MKL is properly installed.
4
5 set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
6
7 set(MKL_REQUIRED_VERSION "20200000")
8
9 set(ProgramFilesx86 "ProgramFiles(x86)")
10 set(INTEL_ROOT $ENV{${ProgramFilesx86}}/IntelSWTools/compilers_and_libraries/windows)
11
12 find_path(MKL_ROOT include/mkl.h PATHS $ENV{MKLROOT} ${INTEL_ROOT}/mkl DOC "Folder contains MKL")
13
14 if (MKL_ROOT STREQUAL "MKL_ROOT-NOTFOUND")
15 message(FATAL_ERROR "Could not find MKL. Before continuing, please download and install MKL (${MKL_REQUIRED_VERSION} or higher) from:"
16 "\n https://registrationcenter.intel.com/en/products/download/3178/\n"
17 "\nAlso ensure vcpkg has been rebuilt with the latest version (v0.0.104 or later)")
18 endif()
19
20 # file(STRINGS ${MKL_ROOT}/include/mkl_version.h MKL_VERSION_DEFINITION REGEX "__INTEL_MKL((_MINOR)|(_UPDATE))?__")
21 # string(REGEX MATCHALL "([0-9]+)" MKL_VERSION ${MKL_VERSION_DEFINITION})
22 # list(GET MKL_VERSION 0 MKL_VERSION_MAJOR)
23 # list(GET MKL_VERSION 1 MKL_VERSION_MINOR)
24 # list(GET MKL_VERSION 2 MKL_VERSION_UPDATE)
25
26 file(STRINGS ${MKL_ROOT}/include/mkl_version.h MKL_VERSION_DEFINITION REGEX "INTEL_MKL_VERSION")
27 string(REGEX MATCH "([0-9]+)" MKL_VERSION ${MKL_VERSION_DEFINITION})
28
29 if (MKL_VERSION LESS MKL_REQUIRED_VERSION)
30 message(FATAL_ERROR "MKL ${MKL_VERSION} is found but ${MKL_REQUIRED_VERSION} is required. Please download and install a more recent version of MKL from:"
31 "\n https://registrationcenter.intel.com/en/products/download/3178/\n")
32 endif()