From 30faf331b8ec86211581f040f17a5b8ee37e46f2 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 11 Oct 2017 21:53:43 +0200 Subject: [PATCH] MDEV-13836 mariadb_config & mysql_config output differ allow to build with the default port number 3306. Now -DMYSQL_TCP_PORT=# sets the default port name and -DMYSQL_TCP_PORT_DEFAULT=# sets the magic port=0 behavior, if it's MYSQL_TCP_PORT_DEFAULT=0 it's enabled, otherwise - disabled. --- cmake/mysql_version.cmake | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake index 87d61fcf344..02579c9534e 100644 --- a/cmake/mysql_version.cmake +++ b/cmake/mysql_version.cmake @@ -69,13 +69,9 @@ ENDMACRO() # Get mysql version and other interesting variables GET_MYSQL_VERSION() -SET(MYSQL_TCP_PORT_DEFAULT "3306") - +SET(MYSQL_TCP_PORT_DEFAULT 0) IF(NOT MYSQL_TCP_PORT) - SET(MYSQL_TCP_PORT ${MYSQL_TCP_PORT_DEFAULT}) - SET(MYSQL_TCP_PORT_DEFAULT "0") -ELSEIF(MYSQL_TCP_PORT EQUAL MYSQL_TCP_PORT_DEFAULT) - SET(MYSQL_TCP_PORT_DEFAULT "0") + SET(MYSQL_TCP_PORT 3306) ENDIF() IF(NOT COMPILATION_COMMENT)