From 53286d6c69aa1290dcfc61847bae35c07c6e05aa Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Mon, 25 Aug 2014 22:01:11 -0700 Subject: Enable compiler warnings with Clang --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59b56b9..ae9d98c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,8 @@ set(VERSION ${_API_VERSION_MAJOR}.${_API_VERSION_MINOR}.${_API_VERSION_PATCH}) if (MSVC) set(CMAKE_C_FLAGS "/W4 /nologo ${CMAKE_C_FLAGS}") +elseif (CMAKE_C_COMPILER_ID MATCHES ".*Clang") + set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wstrict-prototypes -Wcast-align -Wno-unused-function -fno-common -fvisibility=hidden") elseif (CMAKE_COMPILER_IS_GNUCC) set(RMQ_C_FLAGS "-Wall -Wextra -pedantic -Wstrict-prototypes -Wcast-align -Wno-unused-function -fno-common") execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) -- cgit v1.2.1