qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r881677 - /qpid/trunk/qpid/cpp/src/CMakeLists.txt
Date Wed, 18 Nov 2009 06:11:39 GMT
Author: astitcher
Date: Wed Nov 18 06:11:39 2009
New Revision: 881677

URL: http://svn.apache.org/viewvc?rev=881677&view=rev
Log:
Add compile options for SunPro compiler and rearrange setting warnings for GCC

Modified:
    qpid/trunk/qpid/cpp/src/CMakeLists.txt

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=881677&r1=881676&r2=881677&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Wed Nov 18 06:11:39 2009
@@ -124,8 +124,8 @@
   message(STATUS "Can't locate the valgrind command; no run-time error detection")
 endif (ENABLE_VALGRIND AND NOT VALGRIND)
 
-option(ENABLE_WARNINGS "Enable lots of compiler warnings (recommended)" ON)
-if (ENABLE_WARNINGS AND CMAKE_COMPILER_IS_GNUCXX)
+if (CMAKE_COMPILER_IS_GNUCXX)
+   set (COMPILER_FLAGS "")
    # Warnings: Enable as many as possible, keep the code clean. Please
    # do not disable warnings or remove -Werror without discussing on
    # qpid-dev list.
@@ -134,9 +134,20 @@
    # -Wunreachable-code -Wpadded -Winline
    # -Wshadow - warns about boost headers.
    set (WARNING_FLAGS
-        " -Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align
-Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -Woverloaded-virtual")
-   set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}${WARNING_FLAGS})
-endif (ENABLE_WARNINGS AND CMAKE_COMPILER_IS_GNUCXX)
+        "-Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align
-Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -Woverloaded-virtual")
+endif (CMAKE_COMPILER_IS_GNUCXX)
+
+if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
+  set (COMPILER_FLAGS "-library=stlport4 -mt")
+  set (WARNING_FLAGS "+w2")
+endif (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
+
+option(ENABLE_WARNINGS "Enable lots of compiler warnings (recommended)" ON)
+if (NOT ENABLE_WARNINGS)
+  set (WARNING_FLAGS "")
+endif (NOT ENABLE_WARNINGS)
+
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS} ${WARNING_FLAGS}")
 
 # Expand a bit from the basic Find_Boost; be specific about what's needed.
 # TODO: Not all these libs are needed everywhere:



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message