1
0
Fork 0

Bug fix/fix cmake warnings (#5503)

This commit is contained in:
Wilfried Goesgens 2018-06-01 15:51:20 +02:00 committed by Jan
parent 85b89bc8fe
commit 0b81f003a5
7 changed files with 57 additions and 47 deletions

View File

@ -8,6 +8,13 @@ include(ExternalProject)
remove_definitions("-DUSE_ENTERPRISE=1")
################################################################################
## ZLIB
################################################################################
set(SKIP_INSTALL_ALL ON)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/zlib/zlib-1.2.11)
################################################################################
## V8 and ICU
################################################################################
@ -92,6 +99,13 @@ else ()
set(ICU_LIBRARY_DIR "${ICU_LIBRARY_DIR}" PARENT_SCOPE)
endif ()
################################################################################
## Google S2
################################################################################
add_subdirectory(s2geometry)
set(ARANGO_S2GEOMETRY_VERSION "${ARANGO_S2GEOMETRY_VERSION}" PARENT_SCOPE)
################################################################################
## IResearch
################################################################################
@ -201,12 +215,6 @@ if (USE_IRESEARCH)
endif()
endif()
################################################################################
## ZLIB
################################################################################
set(SKIP_INSTALL_ALL ON)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/zlib/zlib-1.2.11)
################################################################################
## cURL
@ -224,12 +232,6 @@ set(ENABLE_THREADED_RESOLVER ON CACHE type BOOL)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/curl/curl-7.57.0)
set(CURL_CONFIG_HAS_BEEN_RUN_BEFORE true PARENT_SCOPE)
################################################################################
## Google S2
################################################################################
add_subdirectory(s2geometry)
################################################################################
## SNAPPY
################################################################################

View File

@ -45,7 +45,10 @@ include(Macros)
include(CMakeDependentOption)
include(CheckCCompilerFlag)
project( CURL C )
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif ()
project( CURL LANGUAGES C VERSION 7.57.0)
# message(WARNING "the curl cmake build system is poorly maintained. Be aware")

View File

@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 2.4.4)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
if (POLICY CMP0042)
cmake_policy(SET CMP0042 OLD)
endif ()
#if (POLICY CMP0042)
# cmake_policy(SET CMP0042 OLD)
#endif ()
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)

View File

@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 2.4.4)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
if (POLICY CMP0042)
cmake_policy(SET CMP0042 OLD)
endif ()
#if (POLICY CMP0042)
# cmake_policy(SET CMP0042 OLD)
#endif ()
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)

View File

@ -6,6 +6,10 @@
cmake_minimum_required(VERSION 3.2)
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif ()
if (POLICY CMP0037)
cmake_policy(SET CMP0037 NEW)
endif ()
@ -37,12 +41,6 @@ if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "deployment target for MacOSX; adjust to your sysem")
endif ()
if (WIN32)
project(arangodb3 CXX C)
else ()
project(arangodb3 CXX C ASM)
endif ()
# required for clang completion in editors
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
@ -58,20 +56,6 @@ endif()
# be verbose about flags used
option(VERBOSE "be verbose about flags used" OFF)
# enable enterprise features
set(ENTERPRISE_INCLUDE_DIR "enterprise")
option(USE_ENTERPRISE "enable enterprise build" OFF)
if (USE_ENTERPRISE)
add_definitions("-DUSE_ENTERPRISE=1")
add_subdirectory(enterprise)
endif ()
option(DEBUG_SYNC_REPLICATION "Enable debug code to enable synchronous replication debugging" OFF)
if (DEBUG_SYNC_REPLICATION)
add_definitions("-DDEBUG_SYNC_REPLICATION=1")
endif ()
# ------------------------------------------------------------------------------
# VERSION information
# ------------------------------------------------------------------------------
@ -92,6 +76,26 @@ endif()
set(ARANGODB_VERSION
"${ARANGODB_VERSION_MAJOR}.${ARANGODB_VERSION_MINOR}.${ARANGODB_VERSION_REVISION}")
if (WIN32)
project(arangodb3 LANGUAGES CXX C VERSION ${ARANGODB_VERSION_MAJOR}.${ARANGODB_VERSION_MINOR})
else ()
project(arangodb3 LANGUAGES CXX C ASM VERSION ${ARANGODB_VERSION_MAJOR}.${ARANGODB_VERSION_MINOR})
endif ()
# enable enterprise features
set(ENTERPRISE_INCLUDE_DIR "enterprise")
option(USE_ENTERPRISE "enable enterprise build" OFF)
if (USE_ENTERPRISE)
add_definitions("-DUSE_ENTERPRISE=1")
add_subdirectory(enterprise)
endif ()
option(DEBUG_SYNC_REPLICATION "Enable debug code to enable synchronous replication debugging" OFF)
if (DEBUG_SYNC_REPLICATION)
add_definitions("-DDEBUG_SYNC_REPLICATION=1")
endif ()
# for the packages
set(ARANGODB_PACKAGE_VENDOR "ArangoDB GmbH")
set(ARANGODB_PACKAGE_CONTACT "info@arangodb.com")
@ -112,7 +116,7 @@ set(ARANGO_VPACK_FRIENDLY_STRING "arangovpack - vpack printer")
# libraries
set(LIB_ARANGO arango)
set(LIB_ARANGO_GEO arango_geo)
set(LIB_ARANGO_GEO arango_geo)
set(LIB_ARANGO_V8 arango_v8)
# binaries
@ -493,7 +497,6 @@ endif ()
set(ARCHITECTURE_OPTIMIZATIONS "\"${Vc_ARCHITECTURE_FLAGS}\"")
################################################################################
## BACKTRACE
################################################################################

View File

@ -167,6 +167,8 @@ VERBOSE=0
MSVC=
ENTERPRISE_GIT_URL=
ARCH="-DTARGET_ARCHITECTURE=nehalem"
case "$1" in
standard)
CFLAGS="${CFLAGS} -O3"
@ -252,7 +254,7 @@ while [ $# -gt 0 ]; do
;;
--noopt)
CONFIGURE_OPTIONS+=(-DUSE_OPTIMIZE_FOR_ARCHITECTURE=Off)
ARCH="-DUSE_OPTIMIZE_FOR_ARCHITECTURE=Off"
shift
;;
@ -273,6 +275,8 @@ while [ $# -gt 0 ]; do
MAKE="cmake --build . --config ${BUILD_CONFIG}"
PACKAGE_MAKE="cmake --build . --config ${BUILD_CONFIG} --target"
CONFIGURE_OPTIONS+=(-DV8_TARGET_ARCHS=Release)
# MSVC doesn't know howto do our assembler in first place.
ARCH="-DUSE_OPTIMIZE_FOR_ARCHITECTURE=Off"
export _IsNativeEnvironment=true
;;
@ -465,7 +469,7 @@ elif [ "$CLANG36" == 1 ]; then
CXXFLAGS="${CXXFLAGS} -std=c++11"
elif [ "${XCGCC}" = 1 ]; then
USE_JEMALLOC=0
ARCH="-DUSE_OPTIMIZE_FOR_ARCHITECTURE=Off"
BUILD_DIR="${BUILD_DIR}-$(basename "${TOOL_PREFIX}")"
# tell cmake we're cross compiling:
@ -535,9 +539,7 @@ if [ -n "$CXX" ]; then
CONFIGURE_OPTIONS+=("-DCMAKE_CXX_COMPILER=${CXX}")
fi
if [ -z "${MSVC}" ]; then
# MSVC doesn't know howto do assembler in first place.
CONFIGURE_OPTIONS+=(-DUSE_OPTIMIZE_FOR_ARCHITECTURE=Off)
if [ "${MSVC}" != "1" ]; then
# on all other system cmake tends to be sluggish on finding strip.
# workaround by presetting it:
if test -z "${STRIP}"; then
@ -573,6 +575,7 @@ if [ -z "${MSVC}" ]; then
fi
CONFIGURE_OPTIONS+=("${MAINTAINER_MODE}")
CONFIGURE_OPTIONS+=("${ARCH}")
if [ "${VERBOSE}" == 1 ]; then
CONFIGURE_OPTIONS+=(-DVERBOSE=ON)

View File

@ -35,7 +35,6 @@ export CPU_CORES=$(grep -c ^processor /proc/cpuinfo)
--buildDir build-${EP}deb \
--targetDir /var/tmp/ \
--jemalloc \
--noopt \
${MOREOPTS} \
$@