mdbx-cmake: minor refine version detection of Elbrus LCC compiler.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-04-05 17:03:28 +03:00
parent f054ceeab8
commit 437cd0d3d7

View File

@ -89,9 +89,11 @@ if(CMAKE_C_COMPILER_LOADED)
if(tmp_lcc_marker GREATER -1 AND tmp_e2k_marker GREATER tmp_lcc_marker) if(tmp_lcc_marker GREATER -1 AND tmp_e2k_marker GREATER tmp_lcc_marker)
execute_process(COMMAND ${CMAKE_C_COMPILER} -print-version execute_process(COMMAND ${CMAKE_C_COMPILER} -print-version
OUTPUT_VARIABLE CMAKE_C_COMPILER_VERSION OUTPUT_VARIABLE CMAKE_C_COMPILER_VERSION
RESULT_VARIABLE tmp_lcc_probe_result) RESULT_VARIABLE tmp_lcc_probe_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CMAKE_COMPILER_IS_ELBRUSC ON) set(CMAKE_COMPILER_IS_ELBRUSC ON)
set(CMAKE_C_COMPILER_ID "Elbrus") set(CMAKE_C_COMPILER_ID "Elbrus")
message(STATUS "Detected Elbrus C compiler ${CMAKE_C_COMPILER_VERSION}")
else() else()
set(CMAKE_COMPILER_IS_ELBRUSC OFF) set(CMAKE_COMPILER_IS_ELBRUSC OFF)
endif() endif()
@ -113,9 +115,11 @@ if(CMAKE_CXX_COMPILER_LOADED)
if(tmp_lcc_marker GREATER -1 AND tmp_e2k_marker GREATER tmp_lcc_marker) if(tmp_lcc_marker GREATER -1 AND tmp_e2k_marker GREATER tmp_lcc_marker)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -print-version execute_process(COMMAND ${CMAKE_CXX_COMPILER} -print-version
OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION
RESULT_VARIABLE tmp_lxx_probe_result) RESULT_VARIABLE tmp_lxx_probe_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CMAKE_COMPILER_IS_ELBRUSCXX ON) set(CMAKE_COMPILER_IS_ELBRUSCXX ON)
set(CMAKE_CXX_COMPILER_ID "Elbrus") set(CMAKE_CXX_COMPILER_ID "Elbrus")
message(STATUS "Detected Elbrus C++ compiler ${CMAKE_CXX_COMPILER_VERSION}")
else() else()
set(CMAKE_COMPILER_IS_ELBRUSCXX OFF) set(CMAKE_COMPILER_IS_ELBRUSCXX OFF)
endif() endif()