未验证 提交 8036c85b 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

[TD-14218]<fix>: clang compile (#11234)

* [TD-14218]<fix>: clang compile

* [TD-14218]<fix>: clang compile

check clang version

* [TD-14218]<fix>: clang compile

check clang version greater or equal
上级 f3ab96c6
...@@ -291,7 +291,7 @@ MESSAGE(STATUS "CMAKE_CXX_COMPILER_ID: " ${CMAKE_CXX_COMPILER_ID}) ...@@ -291,7 +291,7 @@ MESSAGE(STATUS "CMAKE_CXX_COMPILER_ID: " ${CMAKE_CXX_COMPILER_ID})
IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
EXECUTE_PROCESS( COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE clang_full_version_string ) EXECUTE_PROCESS( COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE clang_full_version_string )
string (REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION_STRING ${clang_full_version_string}) string (REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION_STRING ${clang_full_version_string})
IF (CLANG_VERSION_STRING VERSION_GREATER 13.1) IF (CLANG_VERSION_STRING GREATER_EQUAL 13.1)
SET(COMMON_FLAGS "${COMMON_FLAGS} -Wno-unused-but-set-variable") SET(COMMON_FLAGS "${COMMON_FLAGS} -Wno-unused-but-set-variable")
ENDIF () ENDIF ()
ENDIF () ENDIF ()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册