diff options
author | makise-homura <akemi_homura@kurisa.ch> | 2021-10-05 19:41:02 (GMT) |
---|---|---|
committer | makise-homura <akemi_homura@kurisa.ch> | 2021-10-15 02:05:19 (GMT) |
commit | e5d9fce03feeece7f53451da9fb958db2613d31e (patch) | |
tree | a8e5fc2001514dce2f4f390f48f416f650db456e /Modules/CMakeDetermineCompiler.cmake | |
parent | 2b9ef77944cab3a330fa547dbe7e87aefd80b795 (diff) | |
download | CMake-e5d9fce03feeece7f53451da9fb958db2613d31e.zip CMake-e5d9fce03feeece7f53451da9fb958db2613d31e.tar.gz CMake-e5d9fce03feeece7f53451da9fb958db2613d31e.tar.bz2 |
LCC: Add dedicated support for MCST LCC compiler
Divert LCC compiler as a new one, instead of treating it as GNU.
Since old times, Elbrus C/C++/Fortran Compiler (LCC) by MCST has been
passing checks for GNU compilers, so it has been identified as GNU.
Now, with intent of seriously upstreaming its support, it has been
added as a separate LCC compiler, and its version displays not a
supported GCC version, but LCC version itself (e.g. LCC 1.25.19 instead
of GNU 7.3.0).
This commit adds its support for detection, and also converts basically
every check like 'is this compiler GNU?' to 'is this compiler GNU or
LCC?'. The only places where this check is untouched, is where it
regards other platforms where LCC is unavailable (primarily non-Linux),
and where it REALLY differs from GNU compiler.
Note: this transition may break software that are already ported to
Elbrus, but hardly relies that LCC will be detected as GNU; still such
software is not known.
Diffstat (limited to 'Modules/CMakeDetermineCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompiler.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompiler.cmake b/Modules/CMakeDetermineCompiler.cmake index c967ab7..aec86d9 100644 --- a/Modules/CMakeDetermineCompiler.cmake +++ b/Modules/CMakeDetermineCompiler.cmake @@ -148,7 +148,7 @@ macro(_cmake_find_compiler_path lang) endmacro() function(_cmake_find_compiler_sysroot lang) - if(CMAKE_${lang}_COMPILER_ID STREQUAL "GNU") + if(CMAKE_${lang}_COMPILER_ID STREQUAL "GNU" OR CMAKE_${lang}_COMPILER_ID STREQUAL "LCC") execute_process(COMMAND "${CMAKE_${lang}_COMPILER}" -print-sysroot OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE _cmake_sysroot_run_out |