mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into spdvpk
This commit is contained in:
commit
4e0328d46f
|
@ -42,9 +42,12 @@ endif () # TODO: ARM? Win32?
|
|||
|
||||
# target architecture
|
||||
|
||||
file(RELATIVE_PATH V8_REL_TARGET_PATH ${V8_DIR} ${V8_TARGET_DIR})
|
||||
|
||||
list(APPEND V8_GYP_ARGS
|
||||
--generator-output=${V8_TARGET_DIR}
|
||||
--generator-output=${V8_REL_TARGET_PATH}
|
||||
-Dv8_target_arch=${V8_PROC_ARCH}
|
||||
-Dv8_host_arch=${V8_PROC_ARCH}
|
||||
-Dbyteorder=${ENDIANESS}
|
||||
-DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
|
||||
)
|
||||
|
@ -78,11 +81,93 @@ set(V8_INCLUDE_DIR
|
|||
"${PROJECT_NAME}: include path"
|
||||
)
|
||||
|
||||
|
||||
if (${CMAKE_GENERATOR} MATCHES "Ninja")
|
||||
message("NINJA!")
|
||||
|
||||
option(USE_DEBUG_V8 "compile V8 in DEBUG mode" OFF)
|
||||
|
||||
if (USE_DEBUG_V8)
|
||||
set(NINJA_TARGET "optDebug") # one of Debug|Release|Optdebug
|
||||
set(V8_TARGET_ARCH "${V8_PROC_ARCH}.debug")
|
||||
else ()
|
||||
set(NINJA_TARGET "Release") # one of Debug|Release|Optdebug
|
||||
set(V8_TARGET_ARCH "${V8_PROC_ARCH}.release")
|
||||
endif ()
|
||||
|
||||
if (USE_DEBUG_V8)
|
||||
list(APPEND V8_GYP_ARGS -Dv8_enable_backtrace=1)
|
||||
endif ()
|
||||
|
||||
set(V8_LIBRARY_DIR "${V8_TARGET_DIR}/${V8_TARGET_ARCH}")
|
||||
set(ICU_LIBRARY_DIR "${V8_LIBRARY_DIR}")
|
||||
|
||||
set(GYP_MAIN "${V8_DIR}/build/gyp_v8")
|
||||
|
||||
list(APPEND V8_GYP_ARGS ${V8_DIR}/build/all.gyp)
|
||||
list(APPEND V8_GYP_ARGS --format ninja)
|
||||
list(APPEND V8_GYP_ARGS -S.${V8_TARGET_ARCH})
|
||||
|
||||
if (LINUX)
|
||||
set(V8_LIBRARY_DIR "${V8_LIBRARY_DIR}/obj.target/tools/gyp")
|
||||
set(ICU_LIBRARY_DIR "${ICU_LIBRARY_DIR}/obj.target/third_party/icu")
|
||||
elseif (SOLARIS)
|
||||
set(V8_LIBRARY_DIR "${V8_LIBRARY_DIR}/obj.host/tools/gyp")
|
||||
set(ICU_LIBRARY_DIR "${ICU_LIBRARY_DIR}/obj.host/third_party/icu")
|
||||
endif ()
|
||||
|
||||
# Gyp wants to use its own clang if we don't set this:
|
||||
list(APPEND V8_GYP_ARGS
|
||||
-Dclang=0)
|
||||
# -Dv8_use_snapshot=true
|
||||
list(APPEND V8_GYP_ARGS
|
||||
-I${V8_DIR}/build/standalone.gypi
|
||||
--depth=.
|
||||
-Dstandalone_static_library=1
|
||||
-Dlinux_use_bundled_gold=0
|
||||
-Dlinux_use_gold_flags=0
|
||||
-Dv8_no_strict_aliasing=1
|
||||
-Dwerror=
|
||||
)
|
||||
|
||||
set(NINJA_BUILD_DIR "${V8_TARGET_DIR}/${NINJA_TARGET}")
|
||||
ExternalProject_Add(v8_build
|
||||
SOURCE_DIR
|
||||
"${V8_DIR}"
|
||||
CONFIGURE_COMMAND
|
||||
${PYTHON_EXECUTABLE} ${GYP_MAIN} ${V8_GYP_ARGS}
|
||||
BINARY_DIR
|
||||
${NINJA_BUILD_DIR}
|
||||
BUILD_COMMAND
|
||||
${CMAKE_BUILD_TOOL} v8
|
||||
STEP_TARGETS
|
||||
v8_base v8_libbase v8_libplatform v8_nosnapshot icui18n icuuc icudata
|
||||
INSTALL_COMMAND
|
||||
"")
|
||||
|
||||
list(APPEND LINK_DIRECTORIES "${NINJA_BUILD_DIR}/obj/tools/gyp")
|
||||
|
||||
set(V8_LIBS
|
||||
"v8_base;v8_libbase;v8_libplatform;v8_nosnapshot"
|
||||
CACHE INTERNAL
|
||||
"${PROJECT_NAME}: Libraries"
|
||||
)
|
||||
|
||||
list(APPEND LINK_DIRECTORIES "${NINJA_BUILD_DIR}/obj/third_party/icu")
|
||||
|
||||
set(ICU_LIBS
|
||||
"icui18n;icuuc;icudata"
|
||||
CACHE INTERNAL
|
||||
"ICU: Libraries"
|
||||
)
|
||||
|
||||
set(LINK_DIRECTORIES "${LINK_DIRECTORIES}" PARENT_SCOPE)
|
||||
|
||||
################################################################################
|
||||
## WINDOWS
|
||||
################################################################################
|
||||
|
||||
if (WIN32)
|
||||
elseif (WIN32)
|
||||
set(GYP_MAIN ${V8_DIR}/build/gyp_v8)
|
||||
|
||||
# try to find 2013 in 'Visual Studio 12 2013 Win64'
|
||||
|
@ -257,13 +342,17 @@ else ()
|
|||
list(APPEND V8_GYP_ARGS --format make)
|
||||
list(APPEND V8_GYP_ARGS -S.${V8_TARGET_ARCH})
|
||||
|
||||
if (LINUX OR SOLARIS)
|
||||
if (LINUX)
|
||||
set(V8_LIBRARY_DIR "${V8_LIBRARY_DIR}/obj.target/tools/gyp")
|
||||
set(ICU_LIBRARY_DIR "${ICU_LIBRARY_DIR}/obj.target/third_party/icu")
|
||||
elseif (SOLARIS)
|
||||
set(V8_LIBRARY_DIR "${V8_LIBRARY_DIR}/obj.host/tools/gyp")
|
||||
set(ICU_LIBRARY_DIR "${ICU_LIBRARY_DIR}/obj.host/third_party/icu")
|
||||
endif ()
|
||||
|
||||
list(APPEND V8_GYP_ARGS
|
||||
-Ibuild/standalone.gypi
|
||||
-Dv8_use_snapshot=true
|
||||
--depth=.
|
||||
-Dstandalone_static_library=1
|
||||
-Dlinux_use_bundled_gold=0
|
||||
|
|
|
@ -136,7 +136,7 @@ if __name__ == '__main__':
|
|||
for f in glob.glob(os.path.join(v8_root, 'out', 'Makefile.*')):
|
||||
os.unlink(f)
|
||||
# --generator-output defines where the Makefile goes.
|
||||
gyp_args.append('--generator-output=out')
|
||||
#gyp_args.append('--generator-output=out')
|
||||
# -Goutput_dir defines where the build output goes, relative to the
|
||||
# Makefile. Set it to . so that the build output doesn't end up in out/out.
|
||||
gyp_args.append('-Goutput_dir=.')
|
||||
|
|
|
@ -24,40 +24,40 @@ endif ()
|
|||
include(CheckIncludeFile)
|
||||
|
||||
if (MSVC)
|
||||
CHECK_INCLUDE_FILE("winsock.h" HAVE_SYS_SELECT_H)
|
||||
check_include_file("winsock.h" HAVE_SYS_SELECT_H)
|
||||
else()
|
||||
CHECK_INCLUDE_FILE(poll.h HAVE_POLL_H)
|
||||
CHECK_INCLUDE_FILE(port.h HAVE_PORT_H)
|
||||
CHECK_INCLUDE_FILE(sys/epoll.h HAVE_SYS_EPOLL_H)
|
||||
CHECK_INCLUDE_FILE(sys/event.h HAVE_SYS_EVENT_H)
|
||||
CHECK_INCLUDE_FILE(sys/inotify.h HAVE_SYS_INOTIFY_H)
|
||||
CHECK_INCLUDE_FILE(sys/select.h HAVE_SYS_SELECT_H)
|
||||
CHECK_INCLUDE_FILE(sys/signalfd.h HAVE_SYS_SIGNALFD_H)
|
||||
check_include_file(poll.h HAVE_POLL_H)
|
||||
check_include_file(port.h HAVE_PORT_H)
|
||||
check_include_file(sys/epoll.h HAVE_SYS_EPOLL_H)
|
||||
check_include_file(sys/event.h HAVE_SYS_EVENT_H)
|
||||
check_include_file(sys/inotify.h HAVE_SYS_INOTIFY_H)
|
||||
check_include_file(sys/select.h HAVE_SYS_SELECT_H)
|
||||
check_include_file(sys/signalfd.h HAVE_SYS_SIGNALFD_H)
|
||||
endif()
|
||||
|
||||
include(CheckFunctionExists)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(inotify_init HAVE_INOTIFY_INIT)
|
||||
CHECK_FUNCTION_EXISTS(epoll_ctl HAVE_EPOLL_CTL)
|
||||
CHECK_FUNCTION_EXISTS(kqueue HAVE_KQUEUE)
|
||||
CHECK_FUNCTION_EXISTS(port_create HAVE_PORT_CREATE)
|
||||
CHECK_FUNCTION_EXISTS(poll HAVE_POLL)
|
||||
check_function_exists(inotify_init HAVE_INOTIFY_INIT)
|
||||
check_function_exists(epoll_ctl HAVE_EPOLL_CTL)
|
||||
check_function_exists(kqueue HAVE_KQUEUE)
|
||||
check_function_exists(port_create HAVE_PORT_CREATE)
|
||||
check_function_exists(poll HAVE_POLL)
|
||||
if (MSVC)
|
||||
set(HAVE_SELECT 1) # Force select for windows.
|
||||
else()
|
||||
CHECK_FUNCTION_EXISTS(select HAVE_SELECT)
|
||||
check_function_exists(select HAVE_SELECT)
|
||||
endif()
|
||||
CHECK_FUNCTION_EXISTS(eventfd HAVE_EVENTFD)
|
||||
CHECK_FUNCTION_EXISTS(signalfd HAVE_SIGNALFD)
|
||||
CHECK_FUNCTION_EXISTS(clock_gettime HAVE_CLOCK_GETTIME)
|
||||
CHECK_FUNCTION_EXISTS(nanosleep HAVE_NANOSLEEP)
|
||||
CHECK_FUNCTION_EXISTS(floor HAVE_FLOOR)
|
||||
check_function_exists(eventfd HAVE_EVENTFD)
|
||||
check_function_exists(signalfd HAVE_SIGNALFD)
|
||||
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
|
||||
check_function_exists(nanosleep HAVE_NANOSLEEP)
|
||||
check_function_exists(floor HAVE_FLOOR)
|
||||
|
||||
# check system library
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
if (HAVE_CLOCK_GETTIME)
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
check_cxx_source_compiles("
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <time.h>
|
||||
|
@ -66,7 +66,7 @@ if (HAVE_CLOCK_GETTIME)
|
|||
struct timespec ts;
|
||||
int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts);
|
||||
}"
|
||||
HAVE_CLOCK_SYSCALL)
|
||||
HAVE_CLOCK_SYSCALL)
|
||||
endif ()
|
||||
|
||||
################################################################################
|
||||
|
@ -96,12 +96,12 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/libev-${libev_VERSION})
|
|||
|
||||
add_library(ev STATIC
|
||||
${LIBEV_DIR}/ev.c
|
||||
)
|
||||
)
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libev-${libev_VERSION}/config.h
|
||||
)
|
||||
)
|
||||
|
||||
set_target_properties(ev PROPERTIES COMPILE_FLAGS "${FLAGS}")
|
||||
|
||||
|
@ -109,19 +109,19 @@ set(LIBEV_VERSION
|
|||
${libev_VERSION}
|
||||
CACHE INTERNAL
|
||||
"${PROJECT_NAME}: Version"
|
||||
)
|
||||
)
|
||||
|
||||
set(LIBEV_LIBS
|
||||
ev
|
||||
CACHE INTERNAL
|
||||
"${PROJECT_NAME}: Libraries"
|
||||
)
|
||||
)
|
||||
|
||||
set(LIBEV_INCLUDE_DIR
|
||||
${PROJECT_SOURCE_DIR}/${LIBEV_DIR}
|
||||
CACHE INTERNAL
|
||||
"${PROJECT_NAME}: Include Directories"
|
||||
)
|
||||
)
|
||||
|
||||
list(APPEND LINK_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
set(LINK_DIRECTORIES "${LINK_DIRECTORIES}" PARENT_SCOPE)
|
||||
|
|
|
@ -37,8 +37,8 @@ elseif(CMAKE_COMPILER_IS_CLANGCXX)
|
|||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${BASE_COMPILER_OPTIONS} -Os")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${BASE_COMPILER_OPTIONS} -O3 -fomit-frame-pointer")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${BASE_COMPILER_OPTIONS} -O3 -g")
|
||||
|
||||
elseif(MSVC)
|
||||
|
||||
elseif(MSVC)
|
||||
message(STATUS "Compiler type MSVC: ${CMAKE_CXX_COMPILER}")
|
||||
add_definitions("-D_CRT_SECURE_NO_WARNINGS=1")
|
||||
set(${CMAKE_CXX_FLAGS} "${CMAKE_CXX_FLAGS} /MT")
|
||||
|
|
|
@ -51,7 +51,7 @@ if(HAVE_STDDEF_H)
|
|||
endif()
|
||||
check_type_size(off64_t OFF64_T)
|
||||
if(HAVE_OFF64_T)
|
||||
add_definitions(-D_LARGEFILE64_SOURCE=1)
|
||||
add_definitions(-D_LARGEFILE64_SOURCE=1)
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
|
||||
|
||||
|
@ -88,10 +88,10 @@ if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
|||
endif()
|
||||
|
||||
set(ZLIB_PC ${CMAKE_CURRENT_BINARY_DIR}/zlib.pc)
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein
|
||||
${ZLIB_PC} @ONLY)
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
|
||||
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein
|
||||
${ZLIB_PC} @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
|
||||
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
||||
|
||||
|
||||
|
@ -145,30 +145,30 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||
set(ZLIB_ASMS contrib/amd64/amd64-match.S)
|
||||
endif ()
|
||||
|
||||
if(ZLIB_ASMS)
|
||||
add_definitions(-DASMV)
|
||||
set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
|
||||
endif()
|
||||
if(ZLIB_ASMS)
|
||||
add_definitions(-DASMV)
|
||||
set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
if(ASM686)
|
||||
ENABLE_LANGUAGE(ASM_MASM)
|
||||
set(ZLIB_ASMS
|
||||
contrib/masmx86/inffas32.asm
|
||||
contrib/masmx86/match686.asm
|
||||
)
|
||||
enable_language(ASM_MASM)
|
||||
set(ZLIB_ASMS
|
||||
contrib/masmx86/inffas32.asm
|
||||
contrib/masmx86/match686.asm
|
||||
)
|
||||
elseif (AMD64)
|
||||
ENABLE_LANGUAGE(ASM_MASM)
|
||||
enable_language(ASM_MASM)
|
||||
set(ZLIB_ASMS
|
||||
contrib/masmx64/gvmat64.asm
|
||||
contrib/masmx64/inffasx64.asm
|
||||
)
|
||||
contrib/masmx64/gvmat64.asm
|
||||
contrib/masmx64/inffasx64.asm
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ZLIB_ASMS)
|
||||
add_definitions(-DASMV -DASMINF)
|
||||
endif()
|
||||
if(ZLIB_ASMS)
|
||||
add_definitions(-DASMV -DASMINF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
|
||||
|
@ -176,21 +176,21 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
|
|||
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
|
||||
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
|
||||
|
||||
if(MINGW)
|
||||
if(MINGW)
|
||||
# This gets us DLL resource information when compiling on MinGW.
|
||||
if(NOT CMAKE_RC_COMPILER)
|
||||
set(CMAKE_RC_COMPILER windres.exe)
|
||||
set(CMAKE_RC_COMPILER windres.exe)
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
||||
COMMAND ${CMAKE_RC_COMPILER}
|
||||
-D GCC_WINDRES
|
||||
-I ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-I ${CMAKE_CURRENT_BINARY_DIR}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
||||
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
|
||||
COMMAND ${CMAKE_RC_COMPILER}
|
||||
-D GCC_WINDRES
|
||||
-I ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-I ${CMAKE_CURRENT_BINARY_DIR}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
||||
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
|
||||
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
|
||||
endif(MINGW)
|
||||
endif(MINGW)
|
||||
|
||||
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
|
@ -210,28 +210,28 @@ endif()
|
|||
|
||||
if(UNIX)
|
||||
# On unix-like platforms the library is almost always called libz
|
||||
set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
|
||||
if(NOT APPLE AND NOT SOLARIS)
|
||||
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
|
||||
endif()
|
||||
elseif(BUILD_SHARED_LIBS AND WIN32)
|
||||
set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
|
||||
if(NOT APPLE AND NOT SOLARIS)
|
||||
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
|
||||
endif()
|
||||
elseif(BUILD_SHARED_LIBS AND WIN32)
|
||||
# Creates zlib1.dll when building shared library version
|
||||
set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
|
||||
endif()
|
||||
|
||||
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
|
||||
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
install(TARGETS zlib zlibstatic
|
||||
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
|
||||
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" )
|
||||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}")
|
||||
endif()
|
||||
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
|
||||
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
|
||||
install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION "${INSTALL_INC_DIR}")
|
||||
endif()
|
||||
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
|
||||
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL)
|
||||
install(FILES zlib.3 DESTINATION "${INSTALL_MAN_DIR}/man3")
|
||||
endif()
|
||||
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
|
||||
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL)
|
||||
install(FILES ${ZLIB_PC} DESTINATION "${INSTALL_PKGCONFIG_DIR}")
|
||||
endif()
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ if (APPLE)
|
|||
if (NOT DEFINED CMAKE_C_COMPILER)
|
||||
set(CMAKE_C_COMPILER /usr/bin/clang)
|
||||
endif ()
|
||||
|
||||
|
||||
if (NOT DEFINED CMAKE_CXX_COMPILER)
|
||||
set(CMAKE_CXX_COMPILER /usr/bin/clang++)
|
||||
endif ()
|
||||
|
@ -112,7 +112,7 @@ elseif (UNIX AND NOT APPLE)
|
|||
set(SYSV5 TRUE)
|
||||
elseif ((CMAKE_SYSTEM_NAME MATCHES "Solaris.*") OR (CMAKE_SYSTEM_NAME MATCHES "SunOS.*"))
|
||||
set(SOLARIS TRUE)
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "HP-UX.*")
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "HP-UX.*")
|
||||
set(HPUX TRUE)
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "AIX.*")
|
||||
set(AIX TRUE)
|
||||
|
@ -220,6 +220,7 @@ include(CheckCXX11Features)
|
|||
find_package(Threads REQUIRED)
|
||||
|
||||
if (MSVC)
|
||||
configure_file("Installation/Windows/vcproj.user/arangod.vcxproj.user" ${CMAKE_BINARY_DIR})
|
||||
add_definitions("-D_CRT_SECURE_NO_WARNINGS=1")
|
||||
add_definitions("-DFD_SETSIZE=2048")
|
||||
add_definitions("-DUSE_REGEX_STATIC=1")
|
||||
|
@ -418,7 +419,7 @@ elseif (CMAKE_COMPILER_IS_CLANG)
|
|||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -fomit-frame-pointer" CACHE INTERNAL "C++ release flags")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -fno-omit-frame-pointer" CACHE INTERNAL "C++ release with debug info flags")
|
||||
|
||||
elseif (MSVC)
|
||||
elseif (MSVC)
|
||||
if (VERBOSE)
|
||||
message(STATUS "Compiler type MSVC: ${CMAKE_CXX_COMPILER}")
|
||||
endif ()
|
||||
|
|
|
@ -10,7 +10,7 @@ if (USE_MAINTAINER_MODE)
|
|||
man8/rcarangod.8
|
||||
man8/arangod.8
|
||||
man8/arango-dfdb.8
|
||||
man8/foxx-manager.8
|
||||
man8/foxx-manager.8
|
||||
)
|
||||
|
||||
set(MAN_FILES)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerCommandArguments>--config etc/relative/arangod.conf aoeu</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>..\..</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -204,6 +204,14 @@ void SchedulerLibev::switchAllocator() {
|
|||
}
|
||||
}
|
||||
|
||||
static void LibEvErrorLogger(const char *msg) {
|
||||
#if _WIN32
|
||||
TRI_ERRORBUF;
|
||||
TRI_SYSTEM_ERROR();
|
||||
#endif
|
||||
LOG(WARN) << "LIBEV: " << msg << " - " << TRI_GET_ERRORBUF;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief creates a scheduler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -226,6 +234,8 @@ SchedulerLibev::SchedulerLibev(size_t concurrency, int backend)
|
|||
// construct the loops
|
||||
_loops = new struct ev_loop* [nrThreads];
|
||||
|
||||
ev_set_syserr_cb(LibEvErrorLogger);
|
||||
|
||||
((struct ev_loop**)_loops)[0] = ev_default_loop(_backend);
|
||||
|
||||
for (size_t i = 1; i < nrThreads; ++i) {
|
||||
|
|
|
@ -150,9 +150,12 @@ int finalizeWindows(const TRI_win_finalize_e finalizeWhat, char const* data) {
|
|||
|
||||
switch (finalizeWhat) {
|
||||
case TRI_WIN_FINAL_WSASTARTUP_FUNCTION_CALL: {
|
||||
/*
|
||||
TODO: we can't always determine when to call this properly.
|
||||
if we have closed libev, its ok, if we have active socket operations
|
||||
these will fail with errors.
|
||||
int result =
|
||||
WSACleanup(); // could this cause error on server termination?
|
||||
|
||||
WSACleanup(); // could this cause error on server termination?
|
||||
if (result != 0) {
|
||||
// can not use LOG_ etc here since the logging may have terminated
|
||||
printf(
|
||||
|
@ -161,6 +164,7 @@ int finalizeWindows(const TRI_win_finalize_e finalizeWhat, char const* data) {
|
|||
result);
|
||||
return -1;
|
||||
}
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ set(LIB_ARANGO_VPACK
|
|||
${PROJECT_SOURCE_DIR}/3rdParty/velocypack/src/asm-functions.cpp
|
||||
${PROJECT_SOURCE_DIR}/3rdParty/velocypack/src/fasthash.cpp
|
||||
${PROJECT_SOURCE_DIR}/3rdParty/velocypack/src/fpconv.cpp
|
||||
${PROJECT_SOURCE_DIR}/3rdParty/velocypack/src/velocypack-common.cpp
|
||||
${PROJECT_SOURCE_DIR}/3rdParty/velocypack/src/velocypack-common.cpp
|
||||
)
|
||||
|
||||
if (ASM_OPTIMIZATIONS AND CMAKE_TARGET_ARCHITECTURE_CODE MATCHES "x86_64")
|
||||
|
@ -183,7 +183,7 @@ add_library(${LIB_ARANGO} STATIC
|
|||
Basics/hashes.cpp
|
||||
Basics/json-utilities.cpp
|
||||
Basics/json.cpp
|
||||
Basics/levenshtein.cpp
|
||||
Basics/levenshtein.cpp
|
||||
Basics/memory.cpp
|
||||
Basics/mimetypes.cpp
|
||||
Basics/prime-numbers.cpp
|
||||
|
|
Loading…
Reference in New Issue