]> git.cworth.org Git - apitrace/blobdiff - thirdparty/snappy/CMakeLists.txt
snappy: Always build with NDEBUG define.
[apitrace] / thirdparty / snappy / CMakeLists.txt
index b727854de4ffed72f2ca3ea62161105f20ebc446..9bbecdba6d2b9971654f8a7bb706ea702c252626 100644 (file)
@@ -1,30 +1,12 @@
-# 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
-)
-
-check_cxx_source_compiles (
-    "main() { return (__builtin_ctzll(0x100000000LL) == 32) ? 1 : 0; }"
-    HAVE_BUILTIN_CTZ
+add_definitions (
+    -DNDEBUG
+    -DHAVE_CONFIG_H
 )
 
-test_big_endian (WORDS_BIGENDIAN)
-
-configure_file (config.h.in config.h)
-
-add_definitions (-DHAVE_CONFIG_H)
-
-
-include_directories (${CMAKE_CURRENT_BINARY_DIR})
+# Adjust warnings
+if (CMAKE_COMPILER_IS_GNUCXX)
+    add_definitions (-Wno-unused-function)
+endif ()
 
 add_library (snappy_bundled STATIC
     snappy.cc