X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=thirdparty%2Fsnappy%2FCMakeLists.txt;h=25281a6b981cbadb818dced2f75dec654582c011;hb=207ced34a8b998539414c5213acc6d7a393ca27a;hp=b727854de4ffed72f2ca3ea62161105f20ebc446;hpb=c9385be0ae27a206be571f342f299c8762627b56;p=apitrace diff --git a/thirdparty/snappy/CMakeLists.txt b/thirdparty/snappy/CMakeLists.txt index b727854..25281a6 100644 --- a/thirdparty/snappy/CMakeLists.txt +++ b/thirdparty/snappy/CMakeLists.txt @@ -1,32 +1,14 @@ -# We only do the subset of the snappy autoconf that actually affect the library -# (as most of them are for the tests which we don't build.) - -include (CheckIncludeFileCXX) -include (CheckCXXSourceCompiles) -include (TestBigEndian) - -check_include_file_cxx (sys/mman.h HAVE_SYS_MMAN_H) - -check_cxx_source_compiles ( - "main() { return __builtin_expect(1, 1) ? 1 : 0; }" - HAVE_BUILTIN_EXPECT +add_definitions ( + -DNDEBUG + -DHAVE_CONFIG_H ) -check_cxx_source_compiles ( - "main() { return (__builtin_ctzll(0x100000000LL) == 32) ? 1 : 0; }" - HAVE_BUILTIN_CTZ -) - -test_big_endian (WORDS_BIGENDIAN) - -configure_file (config.h.in config.h) +# Adjust warnings +if (CMAKE_COMPILER_IS_GNUCXX) + add_definitions (-Wno-unused-function) +endif () -add_definitions (-DHAVE_CONFIG_H) - - -include_directories (${CMAKE_CURRENT_BINARY_DIR}) - -add_library (snappy_bundled STATIC +add_library (snappy_bundled STATIC EXCLUDE_FROM_ALL snappy.cc snappy-sinksource.cc snappy-stubs-internal.cc @@ -36,3 +18,9 @@ add_library (snappy_bundled STATIC set_target_properties (snappy_bundled PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}" ) + +install ( + FILES COPYING + DESTINATION ${DOC_INSTALL_DIR} + RENAME LICENSE-snappy.txt +)