161 lines
5.4 KiB
Diff
161 lines
5.4 KiB
Diff
--- mysql-5.7.9/client/CMakeLists.txt.orig 2015-10-12 08:21:35.000000000 +0200
|
|
+++ mysql-5.7.9/client/CMakeLists.txt 2015-11-10 21:16:37.264522003 +0100
|
|
@@ -30,12 +30,6 @@ INCLUDE_DIRECTORIES(
|
|
|
|
INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
|
|
|
|
-# Prevent Boost from including external precompiled Boost libraries, use
|
|
-# threading (not implemented for Solaris) and turn off unused functionality.
|
|
-ADD_DEFINITIONS(
|
|
- -DBOOST_ALL_NO_LIB
|
|
- -DBOOST_SYSTEM_NO_DEPRECATED)
|
|
-
|
|
## Subdirectory with common client code.
|
|
ADD_SUBDIRECTORY(base)
|
|
## Subdirectory for mysqlpump code.
|
|
@@ -46,74 +40,6 @@ COPY_OPENSSL_DLLS(copy_openssl_client)
|
|
|
|
INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
|
|
|
|
-SET(BOOST_SOURCES_DIR ${BOOST_PATCHES_DIR})
|
|
-
|
|
-IF(WIN32)
|
|
- LIST(APPEND BOOST_THREAD_SOURCES
|
|
- ${BOOST_SOURCES_DIR}/libs/thread/src/win32/thread.cpp
|
|
- ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp
|
|
- ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_pe.cpp
|
|
- )
|
|
-ELSE()
|
|
- LIST(APPEND BOOST_THREAD_SOURCES
|
|
- ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp
|
|
- ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp
|
|
- )
|
|
-ENDIF()
|
|
-
|
|
-SET(BOOST_LIB_SOURCES
|
|
- ${BOOST_SOURCES_DIR}/libs/atomic/src/lockpool.cpp
|
|
- ${BOOST_SOURCES_DIR}/libs/chrono/src/chrono.cpp
|
|
- ${BOOST_SOURCES_DIR}/libs/chrono/src/process_cpu_clocks.cpp
|
|
- ${BOOST_SOURCES_DIR}/libs/chrono/src/thread_clock.cpp
|
|
- ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp
|
|
- ${BOOST_SOURCES_DIR}/libs/thread/src/future.cpp
|
|
-)
|
|
-
|
|
-ADD_CONVENIENCE_LIBRARY(boost_lib
|
|
- ${BOOST_LIB_SOURCES}
|
|
- ${BOOST_THREAD_SOURCES}
|
|
-)
|
|
-
|
|
-SET_TARGET_PROPERTIES(boost_lib
|
|
- PROPERTIES COMPILE_FLAGS "-DBOOST_THREAD_BUILD_LIB")
|
|
-
|
|
-IF(HAVE_clock_gettime_IN_rt)
|
|
- TARGET_LINK_LIBRARIES(boost_lib ${LIBRT})
|
|
-ENDIF()
|
|
-
|
|
-# Do not build library unless it is needed by some other target.
|
|
-SET_PROPERTY(TARGET boost_lib PROPERTY EXCLUDE_FROM_ALL TRUE)
|
|
-
|
|
-MY_CHECK_CXX_COMPILER_FLAG("-Wno-logical-op" HAVE_NO_LOGICAL_OP)
|
|
-IF(HAVE_NO_LOGICAL_OP)
|
|
- ADD_COMPILE_FLAGS(
|
|
- ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp
|
|
- COMPILE_FLAGS "-Wno-logical-op"
|
|
- )
|
|
-ENDIF()
|
|
-
|
|
-# Boost source has unused local typedefs.
|
|
-MY_CHECK_CXX_COMPILER_FLAG("-Wno-unused-local-typedefs" HAVE_NO_UNUSED_TYPEDEFS)
|
|
-IF(HAVE_NO_UNUSED_TYPEDEFS)
|
|
- ADD_COMPILE_FLAGS(
|
|
- ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp
|
|
- ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp
|
|
- COMPILE_FLAGS "-Wno-unused-local-typedefs"
|
|
- )
|
|
-ENDIF()
|
|
-
|
|
-ADD_COMPILE_FLAGS(
|
|
- ${BOOST_LIB_SOURCES}
|
|
- ${BOOST_THREAD_SOURCES}
|
|
- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
|
|
-)
|
|
-
|
|
-# Need explicit pthread for gcc -fsanitize=address
|
|
-IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
|
|
- TARGET_LINK_LIBRARIES(boost_lib pthread)
|
|
-ENDIF()
|
|
-
|
|
ADD_DEFINITIONS(${SSL_DEFINES})
|
|
MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc ../sql-common/sql_string.cc)
|
|
TARGET_LINK_LIBRARIES(mysql mysqlclient)
|
|
@@ -125,9 +51,6 @@ IF(NOT WITHOUT_SERVER)
|
|
MYSQL_ADD_EXECUTABLE(mysql_upgrade
|
|
upgrade/program.cc
|
|
)
|
|
-ADD_COMPILE_FLAGS(
|
|
- upgrade/program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
|
|
-)
|
|
TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient client_base mysqlcheck_core)
|
|
ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs GenSysSchema)
|
|
ENDIF()
|
|
--- mysql-5.7.9/client/base/CMakeLists.txt.orig 2015-11-10 21:38:13.968255057 +0100
|
|
+++ mysql-5.7.9/client/base/CMakeLists.txt 2015-11-10 21:41:47.685928592 +0100
|
|
@@ -45,14 +45,7 @@ ADD_CONVENIENCE_LIBRARY(client_base
|
|
../../sql-common/sql_string.cc
|
|
)
|
|
|
|
-ADD_COMPILE_FLAGS(
|
|
- mutex.cc
|
|
- mysql_query_runner.cc
|
|
- show_variable_query_extractor.cc
|
|
- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
|
|
-)
|
|
-
|
|
-TARGET_LINK_LIBRARIES(client_base mysqlclient boost_lib)
|
|
+TARGET_LINK_LIBRARIES(client_base mysqlclient boost_chrono boost_system)
|
|
|
|
# Do not build library unless it is needed by some other target.
|
|
SET_PROPERTY(TARGET client_base PROPERTY EXCLUDE_FROM_ALL TRUE)
|
|
--- mysql-5.7.9/client/dump/CMakeLists.txt.orig 2015-11-10 21:37:51.399289532 +0100
|
|
+++ mysql-5.7.9/client/dump/CMakeLists.txt 2015-11-10 21:40:32.536043387 +0100
|
|
@@ -101,7 +101,7 @@ IF (NOT (CMAKE_CXX_COMPILER_ID STREQUAL
|
|
../../sql-common/my_user.c)
|
|
ADD_CONVENIENCE_LIBRARY(mysqlpump_lib ${MYSQLPUMP_LIB_SOURCES})
|
|
TARGET_LINK_LIBRARIES(mysqlpump_lib
|
|
- client_base ${LZ4_LIBRARY} boost_lib)
|
|
+ client_base ${LZ4_LIBRARY} boost_chrono boost_system)
|
|
|
|
# Boost source has unused local typedefs.
|
|
MY_CHECK_CXX_COMPILER_FLAG("-Wno-unused-local-typedefs"
|
|
@@ -125,19 +125,11 @@ IF (NOT (CMAKE_CXX_COMPILER_ID STREQUAL
|
|
ENDIF()
|
|
|
|
ADD_COMPILE_FLAGS(
|
|
- ${MYSQLPUMP_LIB_SOURCES}
|
|
- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
|
|
- )
|
|
-
|
|
- ADD_COMPILE_FLAGS(
|
|
compression_writer.cc
|
|
mysqldump_tool_chain_maker.cc
|
|
COMPILE_FLAGS -I${LZ4_INCLUDE_DIR}
|
|
)
|
|
MYSQL_ADD_EXECUTABLE(mysqlpump program.cc)
|
|
- ADD_COMPILE_FLAGS(
|
|
- program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
|
|
- )
|
|
|
|
TARGET_LINK_LIBRARIES(mysqlpump mysqlpump_lib)
|
|
|
|
--- mysql-5.7.9/CMakeLists.txt.orig 2015-10-12 08:21:33.000000000 +0200
|
|
+++ mysql-5.7.9/CMakeLists.txt 2015-11-11 12:19:26.313509287 +0100
|
|
@@ -432,8 +432,6 @@ ELSE()
|
|
SET(DEFAULT_TMPDIR "\"${TMPDIR}\"")
|
|
ENDIF()
|
|
|
|
-INCLUDE(cmake/boost.cmake)
|
|
-
|
|
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
OPTION(WITH_SYSTEMD "Enable installation of systemd support files" OFF)
|
|
IF (WITH_SYSTEMD)
|