Skip to content

Commit

Permalink
Update Mroonga to the latest version on 2015-04-30T04:44:30+0900
Browse files Browse the repository at this point in the history
  • Loading branch information
Kentoku committed Apr 29, 2015
1 parent 060ec5b commit a0fdb25
Show file tree
Hide file tree
Showing 413 changed files with 25,886 additions and 5,251 deletions.
67 changes: 49 additions & 18 deletions storage/mroonga/CMakeLists.txt
Expand Up @@ -20,24 +20,35 @@
cmake_minimum_required(VERSION 2.6)
project(mroonga)

if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(MRN_BUNDLED FALSE)
else()
set(MRN_BUNDLED TRUE)
endif()

include(TestBigEndian)
test_big_endian(BIG_ENDIAN)
if(BIG_ENDIAN)
message(STATUS "Mroonga is not supported on big-endian")
return()
endif()

if(MSVC)
if(MSVC_VERSION LESS 1600)
message(STATUS "Mroonga supports only MSVC 2010 or later")
set(MRN_BIG_ENDIAN_NOT_SUPPORTED_MESSAGE
"Mroonga doesn't support on big-endian")
if(MRN_BUNDLED)
message(STATUS ${MRN_BIG_ENDIAN_NOT_SUPPORTED_MESSAGE})
return()
else()
message(FATAL_ERROR ${MRN_BIG_ENDIAN_NOT_SUPPORTED_MESSAGE})
endif()
endif()

if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(MRN_BUNDLED FALSE)
else()
set(MRN_BUNDLED TRUE)
if(MSVC)
if(MSVC_VERSION LESS 1800)
set(MRN_OLD_MSVC_MESSAGE "Mroonga supports only MSVC 2013 or later")
if(MRN_BUNDLED)
message(STATUS ${MRN_OLD_MSVC_MESSAGE})
return()
else()
message(FATAL_ERROR ${MRN_OLD_MSVC_MESSAGE})
endif()
endif()
endif()

if(MRN_BUNDLED)
Expand All @@ -46,11 +57,6 @@ if(MRN_BUNDLED)
endif()
endif()

IF(HAVE_WVLA)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-vla")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wno-vla")
ENDIF()

set(MRN_BUNDLED_GROONGA_RELATIVE_DIR "vendor/groonga")
set(MRN_BUNDLED_GROONGA_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/${MRN_BUNDLED_GROONGA_RELATIVE_DIR}")
Expand Down Expand Up @@ -184,6 +190,12 @@ else()
endif()
find_path(MYSQL_CONFIG "${MYSQL_CONFIG}")

if(EXISTS "${MYSQL_SOURCE_DIR}/storage/maria")
set(MYSQL_VARIANT "MariaDB")
else()
set(MYSQL_VARIANT "MySQL")
endif()

if(EXISTS "${MYSQL_SOURCE_DIR}/pcre")
set(MYSQL_REGEX_INCLUDE_DIR "${MYSQL_SOURCE_DIR}/pcre")
else()
Expand All @@ -196,12 +208,24 @@ else()
set(MYSQL_RAPIDJSON_INCLUDE_DIR)
endif()

if(EXISTS "${MYSQL_SOURCE_DIR}/libbinlogevents")
set(MYSQL_LIBBINLOGEVENTS_EXPORT_DIR
"${MYSQL_SOURCE_DIR}/libbinlogevents/export")
set(MYSQL_LIBBINLOGEVENTS_INCLUDE_DIR
"${MYSQL_SOURCE_DIR}/libbinlogevents/include")
else()
set(MYSQL_LIBBINLOGEVENTS_EXPORT_DIR)
set(MYSQL_LIBBINLOGEVENTS_INCLUDE_DIR)
endif()

set(MYSQL_INCLUDE_DIRS
"${MYSQL_BUILD_DIR}/include"
"${MYSQL_SOURCE_DIR}/sql"
"${MYSQL_SOURCE_DIR}/include"
"${MYSQL_REGEX_INCLUDE_DIR}"
"${MYSQL_RAPIDJSON_INCLUDE_DIR}"
"${MYSQL_LIBBINLOGEVENTS_EXPORT_DIR}"
"${MYSQL_LIBBINLOGEVENTS_INCLUDE_DIR}"
"${MYSQL_SOURCE_DIR}")

if(MRN_BUNDLED)
Expand Down Expand Up @@ -261,6 +285,9 @@ else()
pkg_check_modules(GROONGA REQUIRED "groonga >= ${REQUIRED_GROONGA_VERSION}")
pkg_check_modules(GROONGA_NORMALIZER_MYSQL
"groonga-normalizer-mysql >= ${REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION}")
set(MRN_LIBRARY_DIRS
${MRN_LIBRARY_DIRS}
${GROONGA_LIBRARY_DIRS})
endif()

include_directories(
Expand Down Expand Up @@ -337,8 +364,12 @@ else()
mrn_build_flag("-Wno-strict-aliasing")
mrn_build_flag("-Wno-deprecated")
mrn_check_cxxflag("-fno-implicit-templates")
mrn_check_cxxflag("-fno-exceptions")
mrn_check_cxxflag("-fno-rtti")
if(("${MYSQL_VARIANT}" STREQUAL "MariaDB") OR
("${MYSQL_VARIANT}" STREQUAL "MySQL" AND
${MYSQL_VERSION} VERSION_LESS "5.7.0"))
mrn_check_cxxflag("-fno-exceptions")
mrn_check_cxxflag("-fno-rtti")
endif()
mrn_check_cxxflag("-felide-constructors")
endif()
set_source_files_properties(${MRN_SOURCES} PROPERTIES
Expand Down

0 comments on commit a0fdb25

Please sign in to comment.