[Groonga-commit] groonga/groonga at 3db0fdb [master] cmake: enable zlib and LZ4 if they are available by default

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Oct 28 12:11:45 JST 2014


Kouhei Sutou	2014-10-28 12:11:45 +0900 (Tue, 28 Oct 2014)

  New Revision: 3db0fdb140305e2389fe1eff5c0b4807d5140292
  https://github.com/groonga/groonga/commit/3db0fdb140305e2389fe1eff5c0b4807d5140292

  Message:
    cmake: enable zlib and LZ4 if they are available by default

  Modified files:
    CMakeLists.txt

  Modified: CMakeLists.txt (+12 -6)
===================================================================
--- CMakeLists.txt    2014-10-28 12:06:41 +0900 (aa13954)
+++ CMakeLists.txt    2014-10-28 12:11:45 +0900 (43925b3)
@@ -295,19 +295,25 @@ else()
   endif()
 endif()
 
-option(GRN_WITH_ZLIB "Support data compression by zlib." OFF)
-if(GRN_WITH_ZLIB)
+set(GRN_WITH_ZLIB "auto"
+  CACHE STRING "Support data compression by zlib.")
+if(NOT ${GRN_WITH_ZLIB} STREQUAL "no")
   ac_check_lib(z compress)
   if(NOT HAVE_LIBZ)
-    message(FATAL_ERROR "No libz found")
+    if(${GRN_WITH_ZLIB} STREQUAL "yes")
+      message(FATAL_ERROR "No libz found")
+    endif()
   endif()
 endif()
 
-option(GRN_WITH_LZ4 "Support data compression by LZ4." OFF)
-if(GRN_WITH_LZ4)
+set(GRN_WITH_LZ4 "auto"
+  CACHE STRING "Support data compression by LZ4.")
+if(NOT ${GRN_WITH_LZ4} STREQUAL "no")
   ac_check_lib(lz4 LZ4_compress)
   if(NOT HAVE_LIBLZ4)
-    message(FATAL_ERROR "No liblz4 found")
+    if(${GRN_WITH_LZ4} STREQUAL "yes")
+      message(FATAL_ERROR "No liblz4 found")
+    endif()
   endif()
 endif()
 
-------------- next part --------------
HTML����������������������������...
下载 



More information about the Groonga-commit mailing list
Back to archive index