CMAKE__COMPILER_VERSION

From Get docs
Cmake/docs/3.21/variable/cmake lang compiler version


CMAKE__COMPILER_VERSION

Compiler version string.

Compiler version in major[.minor[.patch[.tweak]]] format. This variable is not guaranteed to be defined for all compilers or languages.

For example CMAKE_C_COMPILER_VERSION and CMAKE_CXX_COMPILER_VERSION might indicate the respective C and C++ compiler version.

© 2000–2021 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.21/variable/CMAKE_LANG_COMPILER_VERSION.html