Bug#25942414: SSL VARIABLES USAGE WHEN LIBMYSQL IS COMPILED WITH WITH_SSL=NO
Description: If libmysql is compiled with WITH_SSL=NO, --ssl-* are not useful. Solution: 1. Restricted WITH_SSL to values : bundled | yes | system 2. Made "bundled" as default value for WITH_SSL. Also, not specifying WITH_SSL or even specifying WITH_SSL=no will be treated as/converted to WITH_SSL=bundled. Reviewed-By: Tor Didriksen <tor.didriksen@oracle.com> Reviewed-By: Georgi Kodinov <georgi.kodinov@oracle.com>
This commit is contained in:
parent
8fab3ea01f
commit
c49b270786
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -169,7 +169,6 @@ IF(UNIX)
|
|||||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "+O2 ${COMMON_CXX_FLAGS}")
|
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "+O2 ${COMMON_CXX_FLAGS}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
SET(WITH_SSL no)
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Linux flags
|
# Linux flags
|
||||||
@ -185,7 +184,6 @@ IF(UNIX)
|
|||||||
SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}")
|
SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}")
|
||||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_C_FLAGS}")
|
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_C_FLAGS}")
|
||||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_CXX_FLAGS}")
|
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_CXX_FLAGS}")
|
||||||
SET(WITH_SSL no)
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -13,8 +13,14 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
SET(WITH_SSL_DOC "bundled (use yassl)")
|
||||||
|
SET(WITH_SSL_DOC
|
||||||
|
"${WITH_SSL_DOC}, yes (prefer os library if present, otherwise use bundled)")
|
||||||
|
SET(WITH_SSL_DOC
|
||||||
|
"${WITH_SSL_DOC}, system (use os library)")
|
||||||
|
|
||||||
MACRO (CHANGE_SSL_SETTINGS string)
|
MACRO (CHANGE_SSL_SETTINGS string)
|
||||||
SET(WITH_SSL ${string} CACHE STRING "Options are : no, bundled, yes (prefer os library if present otherwise use bundled), system (use os library)" FORCE)
|
SET(WITH_SSL ${string} CACHE STRING ${WITH_SSL_DOC} FORCE)
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
|
||||||
MACRO (MYSQL_USE_BUNDLED_SSL)
|
MACRO (MYSQL_USE_BUNDLED_SSL)
|
||||||
@ -50,14 +56,12 @@ ENDMACRO()
|
|||||||
# MYSQL_CHECK_SSL
|
# MYSQL_CHECK_SSL
|
||||||
#
|
#
|
||||||
# Provides the following configure options:
|
# Provides the following configure options:
|
||||||
# WITH_SSL=[yes|no|bundled]
|
# WITH_SSL=[bundled|yes|system]
|
||||||
MACRO (MYSQL_CHECK_SSL)
|
MACRO (MYSQL_CHECK_SSL)
|
||||||
IF(NOT WITH_SSL)
|
IF(NOT WITH_SSL)
|
||||||
IF(WIN32)
|
|
||||||
CHANGE_SSL_SETTINGS("bundled")
|
CHANGE_SSL_SETTINGS("bundled")
|
||||||
ELSE()
|
MESSAGE(STATUS "Found WITH_SSL set to no. "
|
||||||
CHANGE_SSL_SETTINGS("no")
|
"Changing it to bundled")
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_SSL STREQUAL "bundled")
|
IF(WITH_SSL STREQUAL "bundled")
|
||||||
@ -84,7 +88,8 @@ MACRO (MYSQL_CHECK_SSL)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
MYSQL_USE_BUNDLED_SSL()
|
MYSQL_USE_BUNDLED_SSL()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSEIF(NOT WITH_SSL STREQUAL "no")
|
ELSE()
|
||||||
MESSAGE(SEND_ERROR "Wrong option for WITH_SSL. Valid values are : yes, no, bundled")
|
MESSAGE(SEND_ERROR "Wrong option for WITH_SSL. "
|
||||||
|
"Valid options are : ${WITH_SSL_DOC}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user