2013-01-23 15:52:59 +01:00
|
|
|
# use the first path that has Thrift.h included, if found
|
|
|
|
|
|
|
|
FIND_PATH(Thrift_INCLUDE_DIRS Thrift.h PATHS
|
|
|
|
$ENV{THRIFT_INCLUDE} # environment variable to be used optionally
|
|
|
|
${Thrift_INCLUDE_DIR} # this may be set
|
|
|
|
/usr/local/include/thrift # list of additional directories to look from
|
|
|
|
/opt/local/include/thrift
|
|
|
|
/usr/include/thrift
|
|
|
|
/opt/include/thrift
|
|
|
|
)
|
|
|
|
|
|
|
|
# Verify that thrift linking library is found
|
2013-04-25 15:12:52 +02:00
|
|
|
SET(Thrift_LIB_PATHS ${Thrift_LIB_PATHS} /usr/local/lib /opt/local/lib /opt/lib)
|
2013-01-23 15:52:59 +01:00
|
|
|
FIND_LIBRARY(Thrift_LIBS NAMES thrift PATHS ${Thrift_LIB_PATHS} ${Thrift_LIB})
|
cmake GUI cleanup
mark path-related variables (AIO_LIBRARY, ODBC_LIBRARY, ODBC_INCLUDE_DIR,
Thrift_LIBS, Thrift_INCLUDE_DIRS, CRYPTO_LIBRARY, OPENSSL_LIBRARIES,
OPENSSL_ROOT_DIR, OPENSSL_INCLUDE_DIR) as advanced - paths are
automatically discovered by cmake.
mark few choice variables (ENABLED_LOCAL_INFILE, WITHOUT_SERVER,
DISABLE_SHARED) as not advanced - they are user choices, not automatically
configured values.
remove unused BACKUP_TEST variable.
2014-06-17 10:59:40 +02:00
|
|
|
|
|
|
|
MARK_AS_ADVANCED(Thrift_LIBS Thrift_INCLUDE_DIRS)
|
|
|
|
|
2013-01-23 15:52:59 +01:00
|
|
|
IF(EXISTS ${Thrift_LIBS})
|
|
|
|
GET_FILENAME_COMPONENT(LINK_DIR ${Thrift_LIBS} PATH ABSOLUTE)
|
MDEV-6248 GUI-friendly cmake options to enable/disable plugins
* Introduce a set of PLUGIN_xxx cmake options with values
NO, STATIC, DYNAMIC, AUTO, YES (abort if plugin is not compiled)
* Deprecate redundant and ambiguous WITH_xxx, WITH_PLUGIN_xxx,
WITH_xxx_STORAGE_ENGINE, WITHOUT_xxx, WITHOUT_PLUGIN_xxx,
WITHOUT_xxx_STORAGE_ENGINE
* Actually check whether a plugin is disabled (DISABLED keyword was
always present, but it was ignored until now).
* Support conditionally disabled plugins - keyword ONLY_IF
* Use ONLY_IF for conditionally skipping plugins, instead of
doing MYSQL_ADD_PLUGIN conditionally as before. Because if
MYSQL_ADD_PLUGIN isn't done at all, PLUGIN_xxx=YES cannot work.
2014-06-23 12:09:00 +02:00
|
|
|
INCLUDE_DIRECTORIES(AFTER ${Thrift_INCLUDE_DIRS}/..)
|
|
|
|
SET(CMAKE_REQUIRED_INCLUDES ${Thrift_INCLUDE_DIRS})
|
2013-01-23 15:52:59 +01:00
|
|
|
|
MDEV-6248 GUI-friendly cmake options to enable/disable plugins
* Introduce a set of PLUGIN_xxx cmake options with values
NO, STATIC, DYNAMIC, AUTO, YES (abort if plugin is not compiled)
* Deprecate redundant and ambiguous WITH_xxx, WITH_PLUGIN_xxx,
WITH_xxx_STORAGE_ENGINE, WITHOUT_xxx, WITHOUT_PLUGIN_xxx,
WITHOUT_xxx_STORAGE_ENGINE
* Actually check whether a plugin is disabled (DISABLED keyword was
always present, but it was ignored until now).
* Support conditionally disabled plugins - keyword ONLY_IF
* Use ONLY_IF for conditionally skipping plugins, instead of
doing MYSQL_ADD_PLUGIN conditionally as before. Because if
MYSQL_ADD_PLUGIN isn't done at all, PLUGIN_xxx=YES cannot work.
2014-06-23 12:09:00 +02:00
|
|
|
STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
|
|
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
2013-01-29 17:42:51 +01:00
|
|
|
|
MDEV-6248 GUI-friendly cmake options to enable/disable plugins
* Introduce a set of PLUGIN_xxx cmake options with values
NO, STATIC, DYNAMIC, AUTO, YES (abort if plugin is not compiled)
* Deprecate redundant and ambiguous WITH_xxx, WITH_PLUGIN_xxx,
WITH_xxx_STORAGE_ENGINE, WITHOUT_xxx, WITHOUT_PLUGIN_xxx,
WITHOUT_xxx_STORAGE_ENGINE
* Actually check whether a plugin is disabled (DISABLED keyword was
always present, but it was ignored until now).
* Support conditionally disabled plugins - keyword ONLY_IF
* Use ONLY_IF for conditionally skipping plugins, instead of
doing MYSQL_ADD_PLUGIN conditionally as before. Because if
MYSQL_ADD_PLUGIN isn't done at all, PLUGIN_xxx=YES cannot work.
2014-06-23 12:09:00 +02:00
|
|
|
SET(CMAKE_REQUIRED_INCLUDES "${Thrift_INCLUDE_DIRS}/..")
|
|
|
|
CHECK_CXX_SOURCE_COMPILES(
|
2013-01-23 15:52:59 +01:00
|
|
|
"
|
2013-04-25 15:12:52 +02:00
|
|
|
#include <thrift/Thrift.h>
|
2013-01-29 17:42:51 +01:00
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
int main() {
|
|
|
|
boost::shared_ptr<char> p(new char(10));
|
|
|
|
return 0;
|
|
|
|
}
|
2013-01-23 15:52:59 +01:00
|
|
|
" CASSANDRASE_OK)
|
MDEV-6248 GUI-friendly cmake options to enable/disable plugins
* Introduce a set of PLUGIN_xxx cmake options with values
NO, STATIC, DYNAMIC, AUTO, YES (abort if plugin is not compiled)
* Deprecate redundant and ambiguous WITH_xxx, WITH_PLUGIN_xxx,
WITH_xxx_STORAGE_ENGINE, WITHOUT_xxx, WITHOUT_PLUGIN_xxx,
WITHOUT_xxx_STORAGE_ENGINE
* Actually check whether a plugin is disabled (DISABLED keyword was
always present, but it was ignored until now).
* Support conditionally disabled plugins - keyword ONLY_IF
* Use ONLY_IF for conditionally skipping plugins, instead of
doing MYSQL_ADD_PLUGIN conditionally as before. Because if
MYSQL_ADD_PLUGIN isn't done at all, PLUGIN_xxx=YES cannot work.
2014-06-23 12:09:00 +02:00
|
|
|
ENDIF()
|
2013-01-23 15:52:59 +01:00
|
|
|
|
MDEV-6248 GUI-friendly cmake options to enable/disable plugins
* Introduce a set of PLUGIN_xxx cmake options with values
NO, STATIC, DYNAMIC, AUTO, YES (abort if plugin is not compiled)
* Deprecate redundant and ambiguous WITH_xxx, WITH_PLUGIN_xxx,
WITH_xxx_STORAGE_ENGINE, WITHOUT_xxx, WITHOUT_PLUGIN_xxx,
WITHOUT_xxx_STORAGE_ENGINE
* Actually check whether a plugin is disabled (DISABLED keyword was
always present, but it was ignored until now).
* Support conditionally disabled plugins - keyword ONLY_IF
* Use ONLY_IF for conditionally skipping plugins, instead of
doing MYSQL_ADD_PLUGIN conditionally as before. Because if
MYSQL_ADD_PLUGIN isn't done at all, PLUGIN_xxx=YES cannot work.
2014-06-23 12:09:00 +02:00
|
|
|
SET(cassandra_sources
|
|
|
|
ha_cassandra.cc
|
|
|
|
ha_cassandra.h
|
|
|
|
cassandra_se.h
|
|
|
|
cassandra_se.cc
|
|
|
|
gen-cpp/Cassandra.cpp
|
|
|
|
gen-cpp/cassandra_types.h
|
|
|
|
gen-cpp/cassandra_types.cpp
|
|
|
|
gen-cpp/cassandra_constants.h
|
|
|
|
gen-cpp/cassandra_constants.cpp
|
|
|
|
gen-cpp/Cassandra.h)
|
2013-01-23 15:52:59 +01:00
|
|
|
|
MDEV-6248 GUI-friendly cmake options to enable/disable plugins
* Introduce a set of PLUGIN_xxx cmake options with values
NO, STATIC, DYNAMIC, AUTO, YES (abort if plugin is not compiled)
* Deprecate redundant and ambiguous WITH_xxx, WITH_PLUGIN_xxx,
WITH_xxx_STORAGE_ENGINE, WITHOUT_xxx, WITHOUT_PLUGIN_xxx,
WITHOUT_xxx_STORAGE_ENGINE
* Actually check whether a plugin is disabled (DISABLED keyword was
always present, but it was ignored until now).
* Support conditionally disabled plugins - keyword ONLY_IF
* Use ONLY_IF for conditionally skipping plugins, instead of
doing MYSQL_ADD_PLUGIN conditionally as before. Because if
MYSQL_ADD_PLUGIN isn't done at all, PLUGIN_xxx=YES cannot work.
2014-06-23 12:09:00 +02:00
|
|
|
LINK_DIRECTORIES(${LINK_DIR})
|
2013-01-23 15:52:59 +01:00
|
|
|
|
2014-06-29 22:44:12 +02:00
|
|
|
IF(CASSANDRASE_OK)
|
2015-02-12 12:26:37 +01:00
|
|
|
MYSQL_ADD_PLUGIN(cassandra ${cassandra_sources} STORAGE_ENGINE
|
|
|
|
MODULE_ONLY LINK_LIBRARIES thrift COMPONENT cassandra-engine)
|
2014-06-29 22:44:12 +02:00
|
|
|
ENDIF(CASSANDRASE_OK)
|