diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2018-04-23 13:51:58 +0300 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2018-04-23 14:22:01 +0300 |
commit | e0b554ada96b2d96d252a0bfde9c807acbde90a3 (patch) | |
tree | 150073a039f1ca5815b0366849aa64b12e965ece /cmake | |
parent | 1508b562ad257fcf914e03b7ab1ac330023cee68 (diff) |
Fix a bunch of warning with clang
The option -Wno-discarded-qualifiers only exists with GCC, clang warns that
it has no effects.
Also it warns when some virtual fuction are marked with override but not
all of them.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/Warnings.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/modules/Warnings.cmake b/cmake/modules/Warnings.cmake index f2c271e88..d4f7c910a 100644 --- a/cmake/modules/Warnings.cmake +++ b/cmake/modules/Warnings.cmake @@ -7,10 +7,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") # Fix sqlite compilation on macOS set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-incompatible-pointer-types-discards-qualifiers") - # Fix sqlite compilation on MinGW - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-discarded-qualifiers") if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + # Fix sqlite compilation on MinGW + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-discarded-qualifiers") + execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) if(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) |