From 8036c85b40dec77298d1a5b12c8efbd9e85d3677 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Sun, 3 Apr 2022 15:37:37 +0800 Subject: [PATCH] [TD-14218]: clang compile (#11234) * [TD-14218]: clang compile * [TD-14218]: clang compile check clang version * [TD-14218]: clang compile check clang version greater or equal --- cmake/define.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/define.inc b/cmake/define.inc index 93f1d6fcbc..0bbc36878d 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 VERSION_GREATER 13.1) + IF (CLANG_VERSION_STRING GREATER_EQUAL 13.1) SET(COMMON_FLAGS "${COMMON_FLAGS} -Wno-unused-but-set-variable") ENDIF () ENDIF () -- GitLab