diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2014-08-25 22:01:11 -0700 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2014-08-25 22:01:11 -0700 |
commit | 53286d6c69aa1290dcfc61847bae35c07c6e05aa (patch) | |
tree | 4ae0c6815bc2b96981899ffe000539f55707a69f | |
parent | d60c28ca0359efdc382ccc58853f925c97bcd4fd (diff) | |
download | rabbitmq-c-github-ask-53286d6c69aa1290dcfc61847bae35c07c6e05aa.tar.gz |
Enable compiler warnings with Clang
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
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) |