Server IP : 104.21.38.3 / Your IP : 162.158.108.171 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/cmake/ |
Upload File : |
# Copyright (c) 2009, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, # as published by the Free Software Foundation. # # This program is also distributed with certain software (including # but not limited to OpenSSL) that is licensed under separate terms, # as designated in a particular file or component or in included license # documentation. The authors of MySQL hereby grant you an additional # permission to link the program and your derivative works with the # separately licensed software that they have included with MySQL. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License, version 2.0, for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # Global constants, only to be changed between major releases. # SET(SHARED_LIB_MAJOR_VERSION "20") SET(SHARED_LIB_MINOR_VERSION "3") SET(PROTOCOL_VERSION "10") SET(DOT_FRM_VERSION "6") # Generate "something" to trigger cmake rerun when VERSION changes CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/VERSION ${CMAKE_BINARY_DIR}/VERSION.dep ) # Read value for a variable from VERSION. MACRO(MYSQL_GET_CONFIG_VALUE keyword var) IF(NOT ${var}) FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=") IF(str) STRING(REPLACE "${keyword}=" "" str ${str}) STRING(REGEX REPLACE "[ ].*" "" str "${str}") SET(${var} ${str}) ENDIF() ENDIF() ENDMACRO() # Read mysql version for configure script MACRO(GET_MYSQL_VERSION) MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_MAJOR" MAJOR_VERSION) MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_MINOR" MINOR_VERSION) MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_PATCH" PATCH_VERSION) MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_EXTRA" EXTRA_VERSION) IF(NOT DEFINED MAJOR_VERSION OR NOT DEFINED MINOR_VERSION OR NOT DEFINED PATCH_VERSION) MESSAGE(FATAL_ERROR "VERSION file cannot be parsed.") ENDIF() SET(VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${EXTRA_VERSION}") MESSAGE(STATUS "MySQL ${VERSION}") SET(MYSQL_BASE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" CACHE INTERNAL "MySQL Base version") SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}") # Use NDBVERSION irregardless of whether this is Cluster or not, if not # then the regex will be ignored anyway. STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}") STRING(REPLACE "-" "_" MYSQL_RPM_VERSION "${NDBVERSION}") MATH(EXPR MYSQL_VERSION_ID "10000*${MAJOR_VERSION} + 100*${MINOR_VERSION} + ${PATCH_VERSION}") MARK_AS_ADVANCED(VERSION MYSQL_VERSION_ID MYSQL_BASE_VERSION) SET(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION}) SET(CPACK_PACKAGE_VERSION_MINOR ${MINOR_VERSION}) SET(CPACK_PACKAGE_VERSION_PATCH ${PATCH_VERSION}) ENDMACRO() # Get mysql version and other interesting variables GET_MYSQL_VERSION() SET(SHARED_LIB_PATCH_VERSION ${PATCH_VERSION}) # Beware : This is a hack to reset SHARED_LIB_PATCH_VERSION in accordance # with the change in value of SHARED_LIB_MINOR_VERSION. MATH(EXPR SHARED_LIB_PATCH_VERSION "${SHARED_LIB_PATCH_VERSION}-13") SET(MYSQL_TCP_PORT_DEFAULT "3306") 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") ENDIF() IF(NOT MYSQL_UNIX_ADDR) SET(MYSQL_UNIX_ADDR "/tmp/mysql.sock") ENDIF() IF(NOT COMPILATION_COMMENT) SET(COMPILATION_COMMENT "Source distribution") ENDIF() # Get the sys schema version from the mysql_sys_schema.sql file # however if compiling without performance schema, always use version 1.0.0 MACRO(GET_SYS_SCHEMA_VERSION) FILE (STRINGS ${CMAKE_SOURCE_DIR}/scripts/mysql_sys_schema.sql str REGEX "SELECT \\'([0-9]+\\.[0-9]+\\.[0-9]+)\\' AS sys_version") IF(str) STRING(REGEX MATCH "([0-9]+\\.[0-9]+\\.[0-9]+)" SYS_SCHEMA_VERSION "${str}") ENDIF() ENDMACRO() GET_SYS_SCHEMA_VERSION() INCLUDE(package_name) IF(NOT CPACK_PACKAGE_FILE_NAME) GET_PACKAGE_FILE_NAME(CPACK_PACKAGE_FILE_NAME) ENDIF() IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME) SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mysql-${VERSION}") IF("${VERSION}" MATCHES "-ndb-") STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}") SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mysql-cluster-gpl-${NDBVERSION}") ENDIF() ENDIF() SET(CPACK_PACKAGE_CONTACT "MySQL Release Engineering <[email protected]>") SET(CPACK_PACKAGE_VENDOR "Oracle Corporation") SET(CPACK_SOURCE_GENERATOR "TGZ") INCLUDE(cpack_source_ignore_files) # Defintions for windows version resources SET(PRODUCTNAME "MySQL Server") SET(COMPANYNAME ${CPACK_PACKAGE_VENDOR}) # Windows 'date' command has unpredictable output, so cannot rely on it to # set MYSQL_COPYRIGHT_YEAR - if someone finds a portable way to do so then # it might be useful #IF (WIN32) # EXECUTE_PROCESS(COMMAND "date" "/T" OUTPUT_VARIABLE TMP_DATE) # STRING(REGEX REPLACE "(..)/(..)/..(..).*" "\\3\\2\\1" MYSQL_COPYRIGHT_YEAR ${TMP_DATE}) IF(UNIX) EXECUTE_PROCESS(COMMAND "date" "+%Y" OUTPUT_VARIABLE MYSQL_COPYRIGHT_YEAR OUTPUT_STRIP_TRAILING_WHITESPACE) ENDIF() # Add version information to the exe and dll files # Refer to http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx # for more info. IF(MSVC) GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) SET(FILETYPE VFT_APP) CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in ${CMAKE_BINARY_DIR}/versioninfo_exe.rc) SET(FILETYPE VFT_DLL) CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in ${CMAKE_BINARY_DIR}/versioninfo_dll.rc) FUNCTION(ADD_VERSION_INFO target target_type sources_var) IF("${target_type}" MATCHES "SHARED" OR "${target_type}" MATCHES "MODULE") SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_dll.rc) ELSEIF("${target_type}" MATCHES "EXE") SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_exe.rc) ENDIF() SET(${sources_var} ${${sources_var}} ${rcfile} PARENT_SCOPE) ENDFUNCTION() ELSE() FUNCTION(ADD_VERSION_INFO) ENDFUNCTION() ENDIF()