qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r1417555 - in /qpid/proton/trunk/proton-c: CMakeLists.txt bindings/CMakeLists.txt
Date Wed, 05 Dec 2012 17:43:08 GMT
Author: astitcher
Date: Wed Dec  5 17:43:07 2012
New Revision: 1417555

URL: http://svn.apache.org/viewvc?rev=1417555&view=rev
Log:
PROTON-168: Add in support to detect MacOS and disable stuff appropriately

Modified:
    qpid/proton/trunk/proton-c/CMakeLists.txt
    qpid/proton/trunk/proton-c/bindings/CMakeLists.txt

Modified: qpid/proton/trunk/proton-c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/CMakeLists.txt?rev=1417555&r1=1417554&r2=1417555&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/CMakeLists.txt Wed Dec  5 17:43:07 2012
@@ -132,10 +132,31 @@ else (UUID_GENERATE_IN_LIBC)
   endif (UUID_GENERATE_IN_UUID)
 endif (UUID_GENERATE_IN_LIBC)
 
-option(ENABLE_WARNING_ERROR "Consider compiler warnings to be errors" ON)
-option(ENABLE_UNDEFINED_ERROR "Check for unresolved library symbols" ON)
+# Try to keep any platform specific overrides together here:
 
-# Set any additional platform specific C compiler flags
+# MacOS has a bunch of differences in build tools and process and so we have to turn some
things
+# off if building there:
+if (APPLE)
+  set (NOBUILD_PHP ON)
+  set (NOENABLE_WARNING_ERROR ON)
+  set (NOENABLE_UNDEFINED_ERROR ON)
+endif (APPLE)
+
+# Add options here called <whatever> they will turn into "ENABLE_<whatever" and
can be
+# overridden on a platform specific basis above by NOENABLE_<whatever>
+set (OPTIONS WARNING_ERROR UNDEFINED_ERROR)
+
+foreach (OPTION ${OPTIONS})
+  if (NOT "NOENABLE_${OPTION}")
+    set ("DEFAULT_${OPTION}" ON)
+  endif (NOT "NOENABLE_${OPTION}")
+endforeach (OPTION)
+
+# And add the option here too with help text
+option(ENABLE_WARNING_ERROR "Consider compiler warnings to be errors" ${DEFAULT_WARNING_ERROR})
+option(ENABLE_UNDEFINED_ERROR "Check for unresolved library symbols" ${DEFAULT_UNDEFINED_ERROR})
+
+# Set any additional compiler specific flags
 if (CMAKE_COMPILER_IS_GNUCC)
   if (ENABLE_WARNING_ERROR)
     set (WERROR "-Werror")

Modified: qpid/proton/trunk/proton-c/bindings/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/CMakeLists.txt?rev=1417555&r1=1417554&r2=1417555&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/CMakeLists.txt Wed Dec  5 17:43:07 2012
@@ -61,6 +61,10 @@ endif (PERLLIBS_FOUND)
 # Shouldn't need to modify below here when adding new language binding
 foreach(BINDING ${BINDINGS})
   string(TOUPPER ${BINDING} UBINDING)
+  # Check whether default was overridden
+  if ("NOBUILD_${UBINDING}")
+    set ("DEFAULT_${UBINDING}" OFF)
+  endif ()
   option("BUILD_${UBINDING}" "Build ${BINDING} language binding" ${DEFAULT_${UBINDING}})
   if ("BUILD_${UBINDING}")
     add_subdirectory(${BINDING})



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message