mirror of https://github.com/google/snappy.git
only 13.1 support unused-but-set-variable
This commit is contained in:
parent
7c0f362021
commit
23978db17a
|
@ -70,7 +70,7 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|||
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.0)
|
||||
if(CLANG_VERSION_STRING GREATER_EQUAL 13.1)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-variable")
|
||||
else()
|
||||
if(NOT CMAKE_CXX_FLAGS MATCHES "-Werror")
|
||||
|
|
Loading…
Reference in New Issue