content_image/855032.jpg
Connection compression using the zstd  algorithm (see Section 4.2.8, “Connection Compression Control” ) requires that the server be built with zstd  library support. The WITH_ZSTD  indicates the source of zstd  support: 

• bundled : Use the zstd  library bundled with the distribution. This is the default. 

## Compiler Flags 

• system : Use the system zstd  library. 

This option was added in MySQL 8.0.18. 

• -DCMAKE_C_FLAGS=" flags " 

Flags for the C Compiler. 

• -DCMAKE_CXX_FLAGS=" flags " 

Flags for the C++ Compiler. 

• -DWITH_DEFAULT_COMPILER_OPTIONS= bool 

Whether to use the flags from cmake/build_configurations/compiler_options.cmake . 

<img src='content_image/855032.jpg'>

## Note 

All optimization flags were carefully chosen and tested by the MySQL build team. Overriding them can lead to unexpected results and is done at your own risk. 

To specify your own C and C++ compiler flags, for flags that do not affect optimization, use the CMAKE_C_FLAGS  and CMAKE_CXX_FLAGS  CMake options. 

When providing your own compiler flags, you might want to specify CMAKE_BUILD_TYPE  as well. 

For example, to create a 32-bit release build on a 64-bit Linux machine, do this: 

mkdir bld cd bld cmake .. -DCMAKE_C_FLAGS=-m32 \ -DCMAKE_CXX_FLAGS=-m32 \ -DCMAKE_BUILD_TYPE=RelWithDebInfo 

If you set flags that affect optimization ( -O number ), you must set the CMAKE_C_FLAGS_ build_type and/or CMAKE_CXX_FLAGS_ build_type  options, where build_type  corresponds to the CMAKE_BUILD_TYPE  value. To specify a different optimization for the default build type ( RelWithDebInfo ) set the CMAKE_C_FLAGS_RELWITHDEBINFO  and CMAKE_CXX_FLAGS_RELWITHDEBINFO  options. For example, to compile on Linux with -O3  and with debug symbols, do this: 

## CMake Options for Compiling NDB Cluster 

cmake .. -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O3 -g" \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O3 -g" 

The following options are for use when building MySQL 8.0 sources with NDB Cluster support. 

• -DMEMCACHED_HOME= dir_name 

