From ce08c461d1947e1e3b63b98c6feec743d4289a5e Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Mon, 4 Apr 2022 09:15:54 +0800 Subject: [PATCH] Hotfix/sangshuduo/td 14218 clang compile (#11238) * [TD-14218]: clang compile * [TD-14218]: clang compile check clang version * [TD-14218]: clang compile check clang version greater or equal * fix clang 13 compile error otherwise compile will fails with unused variable warning adjust to 13.0 --- cmake/define.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/define.inc b/cmake/define.inc index 0bbc36878d..9e3d4a0dfa 100755 --- a/cmake/define.inc +++ b/cmake/define.inc @@ -291,7 +291,7 @@ MESSAGE(STATUS "CMAKE_CXX_COMPILER_ID: " ${CMAKE_CXX_COMPILER_ID}) IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") 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}) - IF (CLANG_VERSION_STRING GREATER_EQUAL 13.1) + IF (CLANG_VERSION_STRING GREATER_EQUAL 13.0) SET(COMMON_FLAGS "${COMMON_FLAGS} -Wno-unused-but-set-variable") ENDIF () ENDIF () -- GitLab