使用Cmake编译Mysql5.5
来源:互联网 发布:linux binary source 编辑:程序博客网 时间:2024/06/06 17:04
This page shows some common autotools configuration options andhow they map to CMake equivalents. It supplements theCMake page that describeshow to build MySQL with CMake.
[edit]Command Invocation SyntaxThe following table shows some common configure invocationsyntax and the equivalent CMake commands. The "." should bereplaced with the path to the top-level directory of the sourcetree if that directory is not your current working directory.
To clean out old object files and cached information beforereconfiguring and rebuilding:
Autotools:
make cleanrm config.cache
CMake (Unix):
make cleanrm CMakeCache.txt
CMake (Windows):
devenv MySQL.sln /cleandel CMakeCache.txt
[edit]Installation Layout Options
These options control where to install various MySQLcomponents.
In the following table, the CMAKE_INSTALL_PREFIX value is theinstallation base directory. Many other CMake layout options areinterpreted relative to the prefix and their values are relativepathnames. Their values should not include the prefix.
Storage engines are plugins, so the options that control pluginbuilding specify which storage engines to build.
The --with-plugins configure option accepts two constructs thathave no direct equivalent in CMake:
--with-plugins accepts a comma-separated list of engine names--with-plugins accepts a "group name" value that is shorthand for aset of enginesWith CMake, engines are controlled with individual options.
Suppose that the configure option is:
--with-plugins=csv,myisam,myisammrg,heap,innobase,archive,blackhole
This builds the named engines as static plugins that arecompiled into the server and need not be installed explicitly.
To convert this for CMake, omit these engine names because theyare mandatory (always compiled in):
csv myisam myisammrg heap
Then use these options to enable the InnoDB, ARCHIVE, andBLACKHOLE engines:
-DWITH_INNOBASE_STORAGE_ENGINE=1-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
You can also use ON rather than 1 as the option value.
If you used--without-plugin-<engine> inconfigure to exclude a storage engine from the build, use-DWITHOUT_<ENGINE>_STORAGE_ENGINE inCMake.
Examples:
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1-DWITHOUT_FEDERATED_STORAGE_ENGINE=1
-DWITHOUT_PARTITION_STORAGE_ENGINE=1
If neither-DWITH_<ENGINE>_STORAGE_ENGINE nor-DWITHOUT_<ENGINE>_STORAGE_ENGINE arespecified for a given storage engine, the engine is built as ashared module, or excluded if it cannot be built as a sharedmodule. A shared module must be installed using the INSTALL PLUGINstatement or the --plugin-load option before it can be used.
For additional information about CMake options for plugins, seethe Pluginsupport page of the Internals manual.
[edit]Library OptionsThese options shown in the following table indicate whichlibraries to use.
Most of the previous MySQL build options are supported. Thenormal mapping between old and new is uppercase, remove leadingdashes, replace dash with underscore.
Examples:
--with-debug => WITH_DEBUG=1--with-embedded-server => WITH_EMBEDDED_SERVER
Parameterconfigure OptionCMake OptionCMake NotesTCP/IP port number--with-tcp-port-=3306-DMYSQL_TCP_PORT=3306 UNIX socket file--with-unix-socket-path=/tmp/mysqld.sock-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock Enable LOCAL for LOAD DATA--enable-local-infile-DENABLED_LOCAL_INFILE=1 Extra charsets--with-extra-charsets=all-DEXTRA_CHARSETS=alldefault is "all"Default charset--with-charset=utf8-DDEFAULT_CHARSET=utf8 Default collation--with-collation=utf8_general_ci-DDEFAULT_COLLATION=utf8_general_ci Build the server--with-servernone Build the embedded server--with-embedded-server-DWITH_EMBEDDED_SERVER=1 libmysqld privilege control--with-embedded-privilege-controlnonealways enabled?Install the documentation--without-docsnone Big tables--with-big-tables, --without-big-tablesnonetables are big by defaultmysqld user--with-mysqld-user=mysql-DMYSQL_USER=mysqlmysql is the defaultDebugging--without-debug-DWITH_DEBUG=0default is debugging disabledGIS support--with-geometrynonealways enabled?Community features--enable-community-featuresnonealways enabledProfiling--disable-profiling-DENABLE_PROFILING=0enabled by defaultpstack--without-pstacknonepstack is removedAssembler string functions--enable-assemblernone Build type--build=x86_64-pc-linux-gnuno equivalentunneeded?Cross-compile host--host=x86_64-pc-linux-gnuno equivalentunneeded?Client flag--with-client-ldflags=-lstdc++noneunneededClient flag--enable-thread-safe-clientnoneunneeded, clients are always thread safeComment--with-comment='string'-DWITH_COMMENT='string' Shared/static binaries--enable-shared --enable-staticnonethere is only DISABLE_SHAREDMemory use--with-low-memorynoneunneeded[edit]Debugging the Configuration Process
Configuration with autotools produces config.log andconfig.status files.
Configuration with CMake produces files under the CMakeFilesdirectory
Previously, third-party tools that need to determine the MySQLversion from the MySQL source read the configure.in file in thetop-level source directory. For example, the AC_INIT line for5.5.7-rc looked like this:
AC_INIT([MySQL Server], [5.5.7-rc], [], [mysql])Such tools now can read the VERSION file. For example, if theversion is 5.5.8, the file looks like this:
MYSQL_VERSION_MAJOR=5MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=8
MYSQL_VERSION_EXTRA=
If the source is not for a General Availablility (GA) release,the MYSQL_VERSION_EXTRA value will be nonempty. For example, thevalue for a Release Candidate release would look like this:
MYSQL_VERSION_EXTRA=rcTo construct a five-digit number from the version components,use this formula:
MYSQL_VERSION_MAJOR*10000 + MYSQL_VERSION_MINOR*100 +MYSQL_VERSION_PATCHRetrieved from "http://forge.mysql.com/wiki/Autotools_to_CMake_Transition_Guide"
This page has been accessed 2,359 times. This page was lastmodified 20:51, 14 December 2010.
- 使用Cmake编译Mysql5.5
- cmake编译安装mysql5.5
- CentOS6.7下使用cmake编译安装MySQL5.5.32
- CentOS6.7下使用cmake编译安装MySQL5.5.32
- CentOS6.7下使用cmake编译安装MySQL5.5.32
- Cmake MySQL5.6 编译安装
- MySQL5.5编译工具configure向cmake过渡指南(转载)
- MySQL5.5编译工具configure向cmake过渡指南
- MySQL5.5编译工具configure向cmake过渡指南
- CentOS 6.x下cmake编译方式安装MySQL5.5
- 使用cmake安装mysql5.5.13
- 使用cmake安装mysql5.5.13
- 使用cmake安装mysql5.5.13
- mysql5.5以后的版本安装使用cmake
- CentOS5.6下使用cmake编译MySQL5.5.13源码和安装笔录
- CentOS5.6下使用cmake编译MySQL5.5.13源码和安装笔录
- CentOS5.6下使用cmake编译MySQL5.5.13源码和安装笔录
- 使用cmake编译开源库
- css固定元素位置(fixed)
- 统计自然语言处理基础学习笔记(2)——语料库
- hpp与.h区别
- Java Portlets 介绍
- linux命令行 (八)
- 使用Cmake编译Mysql5.5
- win7下设置虚拟机中的linux上网
- linux awk 内置变量使用介绍
- Mysql数据库乱码总结
- u-boot-2009.08在mini2440上的移植 增加yaffs2文件系统
- UltraEdit编辑器使用技巧(内置JS脚本)
- MFC中的GDI绘图
- asp.net 动态创建TextBox控件 如何加载状态信息
- 在VS2008的解决方案中添加多个现有工程的方法