MySQL Connector/C++ 1.1 Developer Guide
Connector/C++ recognizes the CMake
options described
in this section.
Table 4.1 Connector/C++ Source-Configuration Option Reference
Formats | Description | Default | Introduced |
---|---|---|---|
BOOST_ROOT |
The Boost source directory | ||
BUNDLE_DEPENDENCIES |
Whether to bundle external dependency libraries with the connector | OFF |
1.1.11 |
CMAKE_BUILD_TYPE |
Type of build to produce | Debug |
|
CMAKE_ENABLE_C++11 |
Whether to enable C++11 support | OFF |
1.1.6 |
CMAKE_INSTALL_PREFIX |
Installation base directory | /usr/local |
|
MYSQLCLIENT_NO_THREADS |
Whether to link against single-threaded MySQL client library | OFF |
|
MYSQLCLIENT_STATIC_BINDING |
Whether to link to the shared MySQL client library | ON |
|
MYSQLCLIENT_STATIC_LINKING |
Whether to statically link to the MySQL client library | ON |
|
MYSQLCPPCONN_GCOV_ENABLE |
Whether to enable gcov support | OFF |
|
MYSQLCPPCONN_TRACE_ENABLE |
Whether to enable tracing functionality | OFF |
|
MYSQL_CFLAGS |
C compiler flags | ||
MYSQL_CONFIG_EXECUTABLE |
Path to the mysql_config program | ${MYSQL_DIR}/bin/mysql_config |
|
MYSQL_CXXFLAGS |
C++ compiler flags | ||
MYSQL_CXX_LINKAGE |
Whether MySQL client library needs C++ linking | ON |
|
MYSQL_DIR |
MySQL Server installation directory | ||
MYSQL_EXTRA_LIBRARIES |
Extra link libraries | ||
MYSQL_INCLUDE_DIR |
The MySQL header file directory | ${MYSQL_DIR}/include |
|
MYSQL_LIB_DIR |
The MySQL client library directory | ${MYSQL_DIR}/lib |
|
MYSQL_LINK_FLAGS |
Extra link flags | ||
USE_SERVER_CXXFLAGS |
Use MySQL Server CXXFLAGS value rather than system default | OFF |
1.1.7 |
The directory where the Boost sources are installed.
This is an internal option used for creating Connector/C++ distribution packages.
The type of build to produce:
Debug
: Disable optimizations and
generate debugging information. This is the default.
Release
: Enable optimizations.
RelWithDebInfo
: Enable optimizations
and generate debugging information.
Whether to enable C++11 support. The default is
OFF
.
-DCMAKE_INSTALL_PREFIX=
dir_name
The installation base directory (where to install Connector/C++).
Whether to link against a single-threaded
libmysqlclient
MySQL client library.
This option is obsolete; libmysqlclient
is
always multithreaded.
-DMYSQLCLIENT_STATIC_BINDING=
bool
Whether to link to the shared MySQL client library. This
option is used only if
MYSQLCLIENT_STATIC_LINKING
is
disabled. disabled to enable dynamic linking to the MySQL
client library. In that case, if
MYSQLCLIENT_STATIC_BINDING
is
enabled (the default), Connector/C++ is linked to the shared MySQL
client library. Otherwise, the shared MySQL client library is
loaded and mapped at runtime. For more information, see
Section 4.5, “Dynamically Linking Connector/C++ Against the MySQL Client Library”.
-DMYSQLCLIENT_STATIC_LINKING=
bool
Whether to link statically to the MySQL client library. The
default is ON
(use static linking to the
client library). Disabling this option enables dynamic linking
to the client library. For more information, see
Section 4.5, “Dynamically Linking Connector/C++ Against the MySQL Client Library”.
-DMYSQLCPPCONN_GCOV_ENABLE=
bool
Whether to enable gcov support.
-DMYSQLCPPCONN_TRACE_ENABLE=
VALUE_TYPE
Whether to enable tracing functionality. For information about tracing, see Chapter 8, Connector/C++ Debug Tracing.
C compiler flags.
-DMYSQL_CONFIG_EXECUTABLE=
file_name
The path to the mysql_config program.
On non-Windows systems, CMake checks to see
whether MYSQL_CONFIG_EXECUTABLE
is set. If not, CMake tries to locate
mysql_config
in the default locations.
C++ compiler flags.
Whether the MySQL client library needs C++ linking.
The directory where MySQL is installed.
Any required additional link libraries.
The directory where the MySQL header files are installed.
The directory where the MySQL client library is installed.
Any required additional link flags.
Use MySQL CXXFLAGS
values rather than the
system default value.