diff options
| author | Fabio Alessandro Locati <me@fale.io> | 2017-02-25 23:39:04 +0000 |
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2017-02-28 13:07:18 -0500 |
| commit | 978a13b0068818d748a0916138b769897bba3b0b (patch) | |
| tree | 52d337a3945145238a1565a24ee3f165f2a68648 | |
| parent | d055fb85bfe79c7a3ecd1c8f3c2030b64e8b9bba (diff) | |
Make it work for all compilers
| -rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f5faba96..685e8fc7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,11 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wimplicit-fallthrough=0") +if (CMAKE_COMPILER_IS_GNUCC) + if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wimplicit-fallthrough=0") + endif() +endif() list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/CMake |
