diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-04-23 08:28:39 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-04-23 08:28:39 +0000 |
commit | ee03c949b85036b68c261dcc27dca064ee7e525d (patch) | |
tree | 14f060f70c0c6e5346a0f120c196f6718b060cd4 /cmake/config-ix.cmake | |
parent | a8958769ea5583d58ae51931d8b1271c23fd20ea (diff) | |
download | external_llvm-ee03c949b85036b68c261dcc27dca064ee7e525d.zip external_llvm-ee03c949b85036b68c261dcc27dca064ee7e525d.tar.gz external_llvm-ee03c949b85036b68c261dcc27dca064ee7e525d.tar.bz2 |
Add basic zlib support to LLVM. This would allow to use compression/uncompression in selected LLVM tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/config-ix.cmake')
-rwxr-xr-x | cmake/config-ix.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 7cad190..c426f41 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -79,6 +79,7 @@ check_include_file(unistd.h HAVE_UNISTD_H) check_include_file(utime.h HAVE_UTIME_H) check_include_file(valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H) check_include_file(windows.h HAVE_WINDOWS_H) +check_include_file(zlib.h HAVE_ZLIB_H) check_include_file(fenv.h HAVE_FENV_H) check_symbol_exists(FE_ALL_EXCEPT "fenv.h" HAVE_DECL_FE_ALL_EXCEPT) check_symbol_exists(FE_INEXACT "fenv.h" HAVE_DECL_FE_INEXACT) @@ -104,6 +105,7 @@ if( NOT PURE_WINDOWS ) endif() check_library_exists(dl dlopen "" HAVE_LIBDL) check_library_exists(rt clock_gettime "" HAVE_LIBRT) + check_library_exists(z compress2 "" HAVE_LIBZ) endif() # function checks @@ -450,4 +452,11 @@ else( LLVM_ENABLE_THREADS ) message(STATUS "Threads disabled.") endif() +if (LLVM_ENABLE_ZLIB ) + # Check if zlib is available in the system. + if ( NOT HAVE_ZLIB_H OR NOT HAVE_LIBZ ) + set(LLVM_ENABLE_ZLIB 0) + endif() +endif() + set(LLVM_PREFIX ${CMAKE_INSTALL_PREFIX}) |