diff options
author | Jan Lindström <jan.lindstrom@skysql.com> | 2015-02-19 17:42:18 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@skysql.com> | 2015-02-19 17:42:18 +0200 |
commit | 9152b83973419ea034bb6040703c18b3ee87e084 (patch) | |
tree | 63a491777c10b1bc4afb3141838676d85df704f3 /cmake/snappy.cmake | |
parent | bab1c686a464afab46caef7639086acefa43b63c (diff) | |
download | mariadb-git-9152b83973419ea034bb6040703c18b3ee87e084.tar.gz |
Merged from 10.0-FusionIO:
Added support for compression method snappy for page compression.
Diffstat (limited to 'cmake/snappy.cmake')
-rw-r--r-- | cmake/snappy.cmake | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cmake/snappy.cmake b/cmake/snappy.cmake new file mode 100644 index 00000000000..cb0839a3480 --- /dev/null +++ b/cmake/snappy.cmake @@ -0,0 +1,32 @@ +# Copyright (C) 2015, MariaDB Corporation. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +SET(WITH_INNODB_SNAPPY AUTO CACHE STRING + "Build with snappy. Possible values are 'ON', 'OFF', 'AUTO' and default is 'AUTO'") + +MACRO (MYSQL_CHECK_SNAPPY) + IF (WITH_INNODB_SNAPPY STREQUAL "ON" OR WITH_INNODB_SNAPPY STREQUAL "AUTO") + CHECK_INCLUDE_FILES(snappy-c.h HAVE_SNAPPY_H) + CHECK_LIBRARY_EXISTS(snappy snappy_uncompress "" HAVE_SNAPPY_SHARED_LIB) + + IF(HAVE_SNAPPY_SHARED_LIB AND HAVE_SNAPPY_H) + ADD_DEFINITIONS(-DHAVE_SNAPPY=1) + LINK_LIBRARIES(snappy) + ELSE() + IF (WITH_INNODB_SNAPPY STREQUAL "ON") + MESSAGE(FATAL_ERROR "Required snappy library is not found") + ENDIF() + ENDIF() + ENDIF() +ENDMACRO() |