summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlan Antonuk <aega@med.umich.edu>2012-05-22 12:34:03 -0400
committerAlan Antonuk <aega@med.umich.edu>2012-05-24 15:46:50 -0400
commit990f932ea4c2aadecf554d7aa59045f862c566ff (patch)
tree5de9b6f235557b5963de761ab4f0f136c0f97808 /CMakeLists.txt
parent970ccbc411c47c72920f1a6c94366ff8dd95a2fe (diff)
downloadrabbitmq-c-github-ask-990f932ea4c2aadecf554d7aa59045f862c566ff.tar.gz
Adding more strict compile Warning flags to gcc build
Added: -Wall -Wextra -pedantic -Wstrict-prototypes -Wcast-align -Wno-unused-function -fno-common -fvisibility=hidden The library compiles cleanly with the exception of the tools dir which has trouble with the initializer lists
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5247fc7..fa3819a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
set(VERSION "0.2")
+if (MSVC)
+ set(CMAKE_C_FLAGS "/W4 /nologo ${CMAKE_C_FLAGS}")
+else ()
+ set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wstrict-prototypes -Wcast-align -Wno-unused-function -fno-common -fvisibility=hidden ${CMAKE_C_FLAGS}")
+endif ()
+
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif()