avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcrea...@apache.org
Subject svn commit: r1507318 - /avro/trunk/lang/c/CMakeLists.txt
Date Fri, 26 Jul 2013 14:03:06 GMT
Author: dcreager
Date: Fri Jul 26 14:03:06 2013
New Revision: 1507318

URL: http://svn.apache.org/r1507318
Log:
AVRO-896. C: Snappy is an optional dependency

Buildbot doesn't have the snappy libraries installed, and it raised an error
trying to compile the C bindings with the previous AVRO-896 patch applied.
Turns out we weren't being careful enough when the Snappy library (and
presumably the other compression libraries) weren't installed.  Now this
correctly results in a good build, of a library with snappy support turned off,
as intended.

Modified:
    avro/trunk/lang/c/CMakeLists.txt

Modified: avro/trunk/lang/c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/CMakeLists.txt?rev=1507318&r1=1507317&r2=1507318&view=diff
==============================================================================
--- avro/trunk/lang/c/CMakeLists.txt (original)
+++ avro/trunk/lang/c/CMakeLists.txt Fri Jul 26 14:03:06 2013
@@ -136,17 +136,19 @@ if (ZLIB_FOUND)
     message("Enabled deflate codec")
 else (ZLIB_FOUND)
     set(ZLIB_PKG "")
+    set(ZLIB_LIBRARIES "")
     message("Disabled deflate codec. zlib not found.")
 endif (ZLIB_FOUND)
 
 find_package(Snappy)
 if (SNAPPY_FOUND AND ZLIB_FOUND)  # Snappy borrows crc32 from zlib
-   set(SNAPPY_PKG libsnappy)
-   add_definitions(-DSNAPPY_CODEC)
-   message("Enabled snappy codec")
+    set(SNAPPY_PKG libsnappy)
+    add_definitions(-DSNAPPY_CODEC)
+    message("Enabled snappy codec")
 else (SNAPPY_FOUND AND ZLIB_FOUND)
-   set (SNAPPY_PKG "")
-   message("Disabled snappy codec. libsnappy not found or zlib not found.")
+    set(SNAPPY_PKG "")
+    set(SNAPPY_LIBRARIES "")
+    message("Disabled snappy codec. libsnappy not found or zlib not found.")
 endif (SNAPPY_FOUND AND ZLIB_FOUND)
 
 find_package(PkgConfig)
@@ -159,6 +161,7 @@ if (LZMA_FOUND)
     message("Enabled lzma codec")
 else (LZMA_FOUND)
     set(LZMA_PKG "")
+    set(LZMA_LIBRARIES "")
     message("Disabled lzma codec. liblzma not found.")
 endif (LZMA_FOUND)
 
@@ -173,4 +176,3 @@ add_subdirectory(docs)
 
 add_custom_target(pretty
     "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_SOURCE_DIR}/cmake_pretty.cmake")
-



Mime
View raw message