... | ... | @@ -256,3 +256,12 @@ A cleaner and more cross-compiling-compatible way to check the current platform |
|
|
Pentium(R) M processor 2.00GHz")
|
|
|
- `CMAKE_HOST_SYSTEM_NAME` : The name of the system hosting the
|
|
|
build. Has the same possible values as **CMAKE_SYSTEM_NAME**.
|
|
|
|
|
|
## Compiler Checking
|
|
|
|
|
|
Similarly, you may also need information about the current compiler and compiler version. This is especially useful for determining compilation flags.
|
|
|
|
|
|
- `CMAKE_<LANG>_COMPILER_ID`: The identity of the compiler for the given language. A list of the possible ID values can be found on [the doc page](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html).
|
|
|
- `CMAKE_<LANG>_COMPILER_VERSION`: The version of the compiler for the given language, e.g. "4.9.2". _WARNING:_ This variable is not supported on all languages and compilers. Notably, CMake versions before 3.3.0 did not support detecting the Fortran compiler version.
|
|
|
- `CMAKE_<LANG>_COMPILER`: The full path to the compiler in use for the given language. You should not change this after the project has been configured, or you will get errors and strange behavior. However, if you set this _before_ enabling a language (using the `project()` or `enable_language()` commands) on the _first_ time the buildscript is run, you can control which compiler CMake will attempt to use.
|
|
|
- `CMAKE_<LANG>_COMPILER_LOADED`: Whether the given language is enabled. |