1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-24 14:20:59 +03:00

Revert back to boost_idb built internal, cleanup cmakelists and add a few more system checks

This commit is contained in:
Ben Thompson
2016-07-27 10:20:57 -05:00
parent 3abaf780d5
commit 479f3cdd50
4 changed files with 42 additions and 63 deletions

View File

@@ -23,6 +23,15 @@ ENDIF()
MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
# Distinguish between community and non-community builds, with the
# default being a community build. This does not impact the feature
# set that will be compiled in; it's merely provided as a hint to
# custom packaging steps.
OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON)
SET(CMAKE_BUILD_TYPE "None" CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel")
#set( CMAKE_VERBOSE_MAKEFILE on )
SET (PACKAGE columnstore)
@@ -62,63 +71,15 @@ if(NOT AWK_EXECUTABLE)
message(FATAL_ERROR "awk not found!")
endif()
#AC_PROG_CPP
#AC_PROG_LN_S
#AC_PROG_MAKE_SET
## FIXME:
## for quicklz (note this macro is not needed if autotools is 1.14 or
## greater, but old versions of CentOS do not have newer version
## of autotools
#AM_PROG_CC_C_O
# Checks for header files.
#AC_FUNC_ALLOCA
#AC_HEADER_STDC
#AC_HEADER_SYS_WAIT
# Checks for typedefs, structures, and compiler characteristics.
#AC_HEADER_STAT
#AC_HEADER_STDBOOL
#AC_C_INLINE
#AC_TYPE_SIZE_T
#AC_HEADER_TIME
#AC_STRUCT_TM
# Checks for library functions.
#AC_FUNC_ERROR_AT_LINE
#AC_REPLACE_FNMATCH
#AC_FUNC_MEMCMP
#AC_FUNC_MKTIME
#AC_FUNC_SETVBUF_REVERSED
#AC_FUNC_STAT
#AC_FUNC_STRFTIME
#AC_FUNC_STRTOD
#AC_MSG_CHECKING(whether to enable debugging)
#AC_SUBST([idb_cppflags], [' '])
#AC_ARG_WITH([debug],
# AS_HELP_STRING([--with-debug],[include debugging symbols/no optimization]))
#if test "x$with_debug" = "xyes"; then
# AC_SUBST([idb_cxxflags],['-ggdb3 -O0 -Wall -D_DEBUG'])
# AC_SUBST([idb_cflags],['-ggdb3 -O0 -Wall -D _DEBUG'])
# AC_MSG_RESULT(yes)
#else
# AC_SUBST([idb_cxxflags],["-g0 -O3 -fno-strict-aliasing -Wall $cxx_extra_flags"])
# AC_SUBST([idb_cflags],['-g0 -O3 -fno-strict-aliasing -Wall'])
# AC_MSG_RESULT(no)
#fi
##-ggdb3 -fno-tree-vectorize -DSAFE_MUTEX -DSAFEMALLOC
SET(CMAKE_CXX_FLAGS "-g0 -O3 -fno-strict-aliasing -Wall -fno-tree-vectorize -DDBUG_OFF -DHAVE_CONFIG_H")
SET(CMAKE_C_FLAGS "-g0 -O3 -fno-strict-aliasing -Wall -fno-tree-vectorize -DDBUG_OFF -DHAVE_CONFIG_H")
SET(CMAKE_CXX_FLAGS "-g0 -O3 -fno-strict-aliasing -Wall -DHAVE_CONFIG_H")
SET(CMAKE_C_FLAGS "-g0 -O3 -fno-strict-aliasing -Wall -DHAVE_CONFIG_H")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3 -fno-tree-vectorize -DSAFE_MUTEX -DSAFEMALLOC -DENABLED_DEBUG_SYNC -O0 -Wall -D_DEBUG -DHAVE_CONFIG_H")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb3 -fno-tree-vectorize -DSAFE_MUTEX -DSAFEMALLOC -DENABLED_DEBUG_SYNC -O0 -Wall -D _DEBUG -DHAVE_CONFIG_H")
#SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3 -O0 -Wall -D_DEBUG -DHAVE_CONFIG_H")
#SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb3 -O0 -Wall -D _DEBUG -DHAVE_CONFIG_H")
#AC_SUBST([idb_ldflags],['-Wl,--rpath -Wl,${idbinstall}/lib -Wl,--no-as-needed -Wl,--add-needed'])
SET (ENGINE_LDFLAGS "-Wl,--rpath -Wl,${INSTALL_ENGINE}/lib -Wl,--no-as-needed -Wl,--add-needed")
#FIND_PACKAGE(Boost 1.55.0 REQUIRED COMPONENTS system filesystem thread regex)
@@ -148,7 +109,6 @@ SET (ENGINE_COMMON_LDFLAGS "")
SET (ENGINE_UTILS_BOOSTIDB_INCLUDE "{CMAKE_CURRENT_SOURCE_DIR}/utils/boost_idb")
SET (ENGINE_UTILS_XML_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/libxml")
SET (ENGINE_UTILS_MESSAGEQCPP_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/messageqcpp")
SET (ENGINE_WE_SHARED_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/writeengine/shared")
@@ -264,9 +224,3 @@ ADD_SUBDIRECTORY(writeengine/splitter)
## this AS IS for now.
#AM_LIBTOOLFLAGS = -Wl,-rpath -Wl,$(prefix)/lib -lrt -lboost_idb
#.PHONY: test coverage leakcheck docs bootstrap install net-snmp-install
#
#net-snmp/net-snmp-5.7.3/agent/.libs/libnetsnmpmibs.so:
# cd net-snmp/net-snmp; \
# ./configure --prefix=${INSTALL_ENGINE} --with-mib-modules=disman/event-mib --with-cc=gcc --with-logfile=$(prefix)/log/snmpd.log --with-sys-location=Unknown --with-sys-contact=root@localhost.localdomain --with-default-snmp-version=3 --with-persistent-directory=$(prefix)var/net-snmp --without-openssl --with-ldflags="-Wl,-rpath -Wl,$(prefix)/lib"
# $(MAKE)
#

View File

@@ -357,7 +357,7 @@
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#cmakedefine inline
#cmakedefine inline ${inline}
#endif
/* Define to rpl_malloc if the replacement function should be used. */
@@ -399,4 +399,4 @@
code using `volatile' can become incorrect without. Disable with care. */
#cmakedefine volatile
#endif
#endif

View File

@@ -68,6 +68,7 @@ ENDIF()
CHECK_FUNCTION_EXISTS (alarm HAVE_ALARM)
CHECK_FUNCTION_EXISTS (btowc HAVE_BTOWC)
CHECK_FUNCTION_EXISTS (dup2 HAVE_DUP2)
CHECK_FUNCTION_EXISTS (error_at_line HAVE_ERROR_AT_LINE)
CHECK_FUNCTION_EXISTS (floor HAVE_FLOOR)
CHECK_FUNCTION_EXISTS (fork HAVE_FORK)
CHECK_FUNCTION_EXISTS (ftime HAVE_FTIME)
@@ -86,6 +87,7 @@ CHECK_FUNCTION_EXISTS (memmove HAVE_MEMMOVE)
CHECK_FUNCTION_EXISTS (mempcpy HAVE_MEMPCPY)
CHECK_FUNCTION_EXISTS (memset HAVE_MEMSET)
CHECK_FUNCTION_EXISTS (mkdir HAVE_MKDIR)
CHECK_FUNCTION_EXISTS (mktime HAVE_MKTIME)
CHECK_FUNCTION_EXISTS (pow HAVE_POW)
CHECK_FUNCTION_EXISTS (regcomp HAVE_REGCOMP)
CHECK_FUNCTION_EXISTS (rmdir HAVE_RMDIR)
@@ -93,6 +95,7 @@ CHECK_FUNCTION_EXISTS (select HAVE_SELECT)
CHECK_FUNCTION_EXISTS (setenv HAVE_SETENV)
CHECK_FUNCTION_EXISTS (setlocale HAVE_SETLOCALE)
CHECK_FUNCTION_EXISTS (socket HAVE_SOCKET)
CHECK_FUNCTION_EXISTS (stat HAVE_STAT)
CHECK_FUNCTION_EXISTS (strcasecmp HAVE_STRCASECMP)
CHECK_FUNCTION_EXISTS (strchr HAVE_STRCHR)
CHECK_FUNCTION_EXISTS (strcspn HAVE_STRCSPN)
@@ -103,6 +106,7 @@ CHECK_FUNCTION_EXISTS (strftime HAVE_STRFTIME)
CHECK_FUNCTION_EXISTS (strrchr HAVE_STRRCHR)
CHECK_FUNCTION_EXISTS (strspn HAVE_STRSPN)
CHECK_FUNCTION_EXISTS (strstr HAVE_STRSTR)
CHECK_FUNCTION_EXISTS (strtod HAVE_STRTOD)
CHECK_FUNCTION_EXISTS (strtol HAVE_STRTOL)
CHECK_FUNCTION_EXISTS (strtoul HAVE_STRTOUL)
CHECK_FUNCTION_EXISTS (strtoull HAVE_STRTOULL)
@@ -691,6 +695,29 @@ ENDIF()
ENDFOREACH()
FOREACH(INLINE_KW inline __inline__ __inline)
CHECK_CXX_SOURCE_COMPILES(
"
#ifndef __cplusplus
typedef int foo_t;
static ${INLINE_KW} foo_t static_foo () {return 0; }
${INLINE_KW} foo_t foo () {return 0; }
int main (){return 0;}
#endif
" INLINE)
IF (INLINE)
SET (inline ${INLINE_KW})
BREAK()
ENDIF()
ENDFOREACH()
IF (NOT INLINE)
SET (inline "")
ENDIF()
EXECUTE_PROCESS(
COMMAND rm -f conftest.data conftest.file conftest.sym
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

View File

@@ -35,8 +35,6 @@ set(boost_idb_LIB_SRCS
add_library(boost_idb SHARED ${boost_idb_LIB_SRCS})
#target_link_libraries(boost_idb ${ENGINE_LDFLAGS})
set_target_properties(boost_idb PROPERTIES VERSION 1.0.0 SOVERSION 1)
install(TARGETS boost_idb DESTINATION ${ENGINE_LIBDIR})