mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 15:45:33 +02:00
5.5.39 merge
This commit is contained in:
commit
6fb17a0601
246 changed files with 5932 additions and 4666 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -80,13 +80,6 @@ IF(ENABLE_DTRACE)
|
|||
${CMAKE_BINARY_DIR}/include/probes_mysql_dtrace.h
|
||||
${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h
|
||||
)
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# Systemtap object
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${DTRACE} -G -s ${CMAKE_SOURCE_DIR}/include/probes_mysql.d.base
|
||||
-o ${CMAKE_BINARY_DIR}/probes_mysql.o
|
||||
)
|
||||
ENDIF()
|
||||
ADD_CUSTOM_TARGET(gen_dtrace_header
|
||||
DEPENDS
|
||||
${CMAKE_BINARY_DIR}/include/probes_mysql.d
|
||||
|
|
@ -105,12 +98,7 @@ FUNCTION(DTRACE_INSTRUMENT target)
|
|||
IF(ENABLE_DTRACE)
|
||||
ADD_DEPENDENCIES(${target} gen_dtrace_header)
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
TARGET_LINK_LIBRARIES(${target} ${CMAKE_BINARY_DIR}/probes_mysql.o)
|
||||
ENDIF()
|
||||
|
||||
# On Solaris, invoke dtrace -G to generate object file and
|
||||
# link it together with target.
|
||||
# Invoke dtrace to generate object file and link it together with target.
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
||||
SET(objdir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${target}.dir)
|
||||
SET(outfile ${objdir}/${target}_dtrace.o)
|
||||
|
|
@ -127,6 +115,21 @@ FUNCTION(DTRACE_INSTRUMENT target)
|
|||
-P ${CMAKE_SOURCE_DIR}/cmake/dtrace_prelink.cmake
|
||||
WORKING_DIRECTORY ${objdir}
|
||||
)
|
||||
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# dtrace on Linux runs gcc and uses flags from environment
|
||||
SET(CFLAGS_SAVED $ENV{CFLAGS})
|
||||
SET(ENV{CFLAGS} ${CMAKE_C_FLAGS})
|
||||
SET(outfile "${CMAKE_BINARY_DIR}/probes_mysql.o")
|
||||
# Systemtap object
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${DTRACE} -G -s ${CMAKE_SOURCE_DIR}/include/probes_mysql.d.base
|
||||
-o ${outfile}
|
||||
)
|
||||
SET(ENV{CFLAGS} ${CFLAGS_SAVED})
|
||||
ENDIF()
|
||||
|
||||
# Do not try to extend the library if we have not built the .o file
|
||||
IF(outfile)
|
||||
# Add full object path to linker flags
|
||||
GET_TARGET_PROPERTY(target_type ${target} TYPE)
|
||||
IF(NOT target_type MATCHES "STATIC")
|
||||
|
|
@ -138,12 +141,12 @@ FUNCTION(DTRACE_INSTRUMENT target)
|
|||
# but maybe one day this will be fixed.
|
||||
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET ${target} POST_BUILD
|
||||
COMMAND ${CMAKE_AR} r ${target_location} ${outfile}
|
||||
COMMAND ${CMAKE_RANLIB} ${target_location}
|
||||
)
|
||||
# Used in DTRACE_INSTRUMENT_WITH_STATIC_LIBS
|
||||
SET(TARGET_OBJECT_DIRECTORY_${target} ${objdir} CACHE INTERNAL "")
|
||||
TARGET ${target} POST_BUILD
|
||||
COMMAND ${CMAKE_AR} r ${target_location} ${outfile}
|
||||
COMMAND ${CMAKE_RANLIB} ${target_location}
|
||||
)
|
||||
# Used in DTRACE_INSTRUMENT_WITH_STATIC_LIBS
|
||||
SET(TARGET_OBJECT_DIRECTORY_${target} ${objdir} CACHE INTERNAL "")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
|
|||
STRING(REPLACE ".dll" ".pdb" pdb_location ${pdb_location})
|
||||
STRING(REPLACE ".lib" ".pdb" pdb_location ${pdb_location})
|
||||
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
|
||||
STRING(REPLACE
|
||||
"${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
|
||||
pdb_location ${pdb_location})
|
||||
ENDIF()
|
||||
|
||||
set(comp "")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -62,22 +62,30 @@ IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|||
ENDIF()
|
||||
|
||||
IF(MSVC)
|
||||
# Enable debug info also in Release build, and create PDB to be able to analyze
|
||||
# crashes
|
||||
FOREACH(lang C CXX)
|
||||
SET(CMAKE_${lang}_FLAGS_RELEASE "${CMAKE_${lang}_FLAGS_RELEASE} /Zi")
|
||||
ENDFOREACH()
|
||||
# Enable debug info also in Release build,
|
||||
# and create PDB to be able to analyze crashes.
|
||||
FOREACH(type EXE SHARED MODULE)
|
||||
SET(CMAKE_{type}_LINKER_FLAGS_RELEASE "${CMAKE_${type}_LINKER_FLAGS_RELEASE} /debug")
|
||||
SET(CMAKE_{type}_LINKER_FLAGS_RELEASE
|
||||
"${CMAKE_${type}_LINKER_FLAGS_RELEASE} /debug")
|
||||
ENDFOREACH()
|
||||
|
||||
# Force static runtime libraries
|
||||
# - Choose debugging information:
|
||||
# /Z7
|
||||
# Produces an .obj file containing full symbolic debugging
|
||||
# information for use with the debugger. The symbolic debugging
|
||||
# information includes the names and types of variables, as well as
|
||||
# functions and line numbers. No .pdb file is produced by the compiler.
|
||||
FOREACH(lang C CXX)
|
||||
SET(CMAKE_${lang}_FLAGS_RELEASE "${CMAKE_${lang}_FLAGS_RELEASE} /Z7")
|
||||
ENDFOREACH()
|
||||
FOREACH(flag
|
||||
CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
|
||||
CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
|
||||
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
|
||||
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
|
||||
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
|
||||
STRING(REPLACE "/Zi" "/Z7" "${flag}" "${${flag}}")
|
||||
ENDFOREACH()
|
||||
|
||||
|
||||
|
|
@ -105,7 +113,6 @@ IF(MSVC)
|
|||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /we4099")
|
||||
|
||||
|
||||
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
# _WIN64 is defined by the compiler itself.
|
||||
# Yet, we define it here again to work around a bug with Intellisense
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue