
2025-07-16 17:17:46
So you need to get the version of Intel #MKL.
You can't really take it out of the pkg-config files, because not every distro mkl version combo supplies these files. On top of that, without pointing fingers, certain distribution installs pkg-config files with "debian" in the version field.
Well, there's INTEL_MKL_VERSION you can get via the C preprocessor, right? Except that its semantics depend… on mkl version. Given that mkl is released as "<major>.<update>.<patch>", versions prior to 2025.0.0 constructed the version number from <major> <minor> <update> (where <minor> seems to be always 0, and <patch> was not included), and 2025.0.0 forward use the more logical <major> <update> <patch>.
Well, yeah, it's kinda doable. You parse the major first, and parse the rest depending on whether it's >= 2025 or not. For versions prior to 2025, you get it truncated to update. It works, but still kinda funny.
#WTF