Commit b6e0f92f authored by Alexander Nozdrin's avatar Alexander Nozdrin

Auto-merge from mysql-next-mr-bugfixing.

parents 1e6b33ec 7684386f
[MYSQL]
post_commit_to = "commits@lists.mysql.com"
post_push_to = "commits@lists.mysql.com"
tree_name = "mysql-5.5-next-mr"
tree_name = "mysql-next-mr-bugfixing"
How to Build MySQL server with CMake
WHAT YOU NEED
---------------------------------------------------------------
CMake version 2.6 or later installed on your system.
HOW TO INSTALL:
Linux distributions:
shell> sudo apt-get install cmake
The above works on do Debian/Ubuntu based distributions.On others, command
line needs to be modified to e.g "yum install" on Fedora or "zypper install"
on OpenSUSE.
OpenSolaris:
shell> pfexec pkgadd install SUNWcmake
Windows and Mac OSX:
Download and install the latest distribution from
http://www.cmake.org/cmake/resources/software.html.On Windows, download
installer exe file and run it. On Mac, download the .dmg image and open it.
Other Unixes:
Precompiled packages for other Unix flavors (HPUX, AIX) are available from
http://www.cmake.org/cmake/resources/software.html
Alternatively, you can build from source, source package is also available on
CMake download page.
Compiler Tools
--------------
You will need a working compiler and make utility on your OS.
On Windows, install Visual Studio (Express editions will work too).
On Mac OSX, install Xcode tools.
BUILD
---------------------------------------------------------------
Ensure that compiler and cmake are in PATH.
The following description assumes that current working directory
is the source directory.
- Generic build on Unix, using "Unix Makefiles" generator
shell>cmake .
shell>make
Note: by default, cmake build is less verbose than automake build. Use
"make VERBOSE=1" if you want to see add command lines for each compiled source.
- Windows, using "Visual Studio 9 2008" generator
shell>cmake . -G "Visual Studio 9 2008"
shell>devenv MySQL.sln /build /relwithdebinfo
(alternatively, open MySQL.sln and build using the IDE)
- Windows, using "NMake Makefiles" generator
shell>cmake . -G "NMake Makefiles"
shell>nmake
- Mac OSX build with Xcode
shell>cmake . -G Xcode
shell>xcodebuild -configuration Relwithdebinfo
(alternatively, open MySQL.xcodeproj and build using the IDE)
Command line build with CMake 2.8
After creating project with cmake -G as above, issue
cmake . --build
this works with any CMake generator.
For Visual Studio and Xcode you might want to add an extra
configuration parameter, to avoid building all configurations.
cmake . --build --config Relwithdebinfo
Building "out-of-source"
---------------------------------------------------------------
Building out-of-source provides additional benefits. For example it allows to
build both Release and Debug configurations using the single source tree.Or
build the same source with different version of the same compiler or with
different compilers. Also you will prevent polluting the source tree with the
objects and binaries produced during the make.
Here is an example on how to do it (generic Unix), assuming the source tree is
in directory named src and the current working directory is source root.
shell>mkdir ../build # build directory is called build
shell>cd ../build
shell>cmake ../src
Note: if a directory was used for in-source build, out-of-source will
not work. To reenable out-of-source build, remove <source-root>/CMakeCache.txt
file.
CONFIGURATION PARAMETERS
---------------------------------------------------------------
The procedure above will build with default configuration.
Let's you want to change the configuration parameters and have archive
storage engine compiled into the server instead of building it as pluggable
module.
1)You can provide parameters on the command line, like
shell> cmake . -DWITH_ARCHIVE_STORAGE_ENGINE=1
This can be done during the initial configuration or any time later.
Note, that parameters are "sticky", that is they are remebered in the CMake
cache (CMakeCache.txt file in the build directory)
2) Configuration using cmake-gui (Windows, OSX, or Linux with cmake-gui
installed)
From the build directory, issue
shell> cmake-gui .
- Check the WITH_INNOBASE_STORAGE_ENGINE checkbox
- Click on "Configure" button
- Click on "Generate" button
- Close cmake-gui
shell> make
3)Using ccmake (Unix)
ccmake is curses-based GUI application that provides the same functionality
as cmake-gui. It is less user-friendly compared to cmake-gui but works also
on exotic Unixes like HPUX, AIX or Solaris.
Besides storage engines, probably the most important parameter from a
developer's point of view is WITH_DEBUG (this allows to build server with
dbug tracing library and with debug compile flags).
After changing the configuration, recompile using
shell> make
Listing configuration parameters
---------------------------------------------------------------
shell> cmake -L
Gives a brief overview of important configuration parameters (dump to stdout)
shell> cmake -LH
Does the same but also provides a short help text for each parameter.
shell> cmake -LAH
Dumps all config parameters (including advanced) to the stdout.
PACKAGING
---------------------------------------------------------------
-- Binary distribution --
Packaging in form of tar.gz archives (or .zip on Windows) is also supported
To create a tar.gz package,
1)If you're using "generic" Unix build with makefiles
shell> make package
this will create a tar.gz file in the top level build directory.
2)On Windows, using "NMake Makefiles" generator
shell> nmake package
3)On Windows, using "Visual Studio" generator
shell> devenv mysql.sln /build relwithdebinfo /project package
Note On Windows, 7Zip or Winzip must be installed and 7z.exe rsp winzip.exe
need to be in the PATH.
Another way to build packages is calling cpack executable directly like
shell> cpack -G TGZ --config CPackConfig.cmake
(-G TGZ is for tar.gz generator, there is also -GZIP)
-- Source distribution --
"make dist" target is provided.
ADDITIONAL MAKE TARGETS: "make install" AND "make test"
----------------------------------------------------------------
install target also provided for Makefile based generators. Installation
directory can be controlled using configure-time parameter
CMAKE_INSTALL_PREFIX (default is /usr/local. It is also possible to install to
non-configured directory, using
shell> make install DESTDIR="/some/absolute/path"
"make test" runs unit tests (uses CTest for it)
"make test-force" runs mysql-test-run.pl tests with --test-force parameter
FOR PROGRAMMERS: WRITING PLATFORM CHECKS
--------------------------------------------------------------
If you modify MySQL source and want to add a new platform check,please read
http://www.vtk.org/Wiki/CMake_HowToDoPlatformChecks first. In MySQL, most of
the platform tests are implemented in configure.cmake and the template header
file is config.h.cmake
Bigger chunks of functionality, for example non-trivial macros are implemented
in files <src-root>/cmake subdirectory.
For people with autotools background, it is important to remember CMake does
not provide autoheader functionality. That is, when you add a check
CHECK_FUNCTION_EXISTS(foo HAVE_FOO)
to config.cmake, then you will also need to add
#cmakedefine HAVE_FOO 1
to config.h.cmake
Troubleshooting platform checks
--------------------------------
If you suspect that a platform check returned wrong result, examine
<build-root>/CMakeFiles/CMakeError.log and
<build-root>/CMakeFiles/CMakeOutput.log
These files they contain compiler command line, and exact error messages.
Troubleshooting CMake code
----------------------------------
While there are advanced flags for cmake like -debug-trycompile and --trace,
a simple and efficient way to debug to add
MESSAGE("interesting variable=${some_invariable}")
to the interesting places in CMakeLists.txt
Tips:
- When using Makefile generator it is easy to examine which compiler flags are
used to build. For example, compiler flags for mysqld are in
<build-root>/sql/CMakeFiles/mysqld.dir/flags.make and the linker command line
is in <build-root>/sql/CMakeFiles/mysqld.dir/link.txt
- CMake caches results of platform checks in CMakeCache.txt. It is a nice
feature because tests do not rerun when reconfiguring (e.g when a new test was
added).The downside of caching is that when a platform test was wrong and was
later corrected, the cached result is still used. If you encounter this
situation, which should be a rare occation, you need either to remove the
offending entry from CMakeCache.txt (if test was for HAVE_FOO, remove lines
containing HAVE_FOO from CMakeCache.txt) or just remove the cache file.
......@@ -20,6 +20,7 @@
EXTRA_DIST = FINISH.sh \
SETUP.sh \
autorun.sh \
choose_configure.sh \
build_mccge.sh \
check-cpu \
cleanup \
......
......@@ -20,6 +20,7 @@ do
done
IFS="$save_ifs"
rm -rf configure
aclocal || die "Can't execute aclocal"
autoheader || die "Can't execute autoheader"
# --force means overwrite ltmain.sh script if it already exists
......@@ -29,3 +30,9 @@ $LIBTOOLIZE --automake --force --copy || die "Can't execute libtoolize"
# and --force to overwrite them if they already exist
automake --add-missing --force --copy || die "Can't execute automake"
autoconf || die "Can't execute autoconf"
# Do not use autotools generated configure directly. Instead, use a script
# that will either call CMake or original configure shell script at build
# time (CMake is preferred if installed).
mv configure configure.am
cp BUILD/choose_configure.sh configure
chmod a+x configure
#!/bin/sh
# Choose whether to use autoconf created configure
# of perl script that calls cmake.
# Ensure cmake and perl are there
cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no
perl --version >/dev/null 2>&1 || HAVE_CMAKE=no
if test "$HAVE_CMAKE" = "no"
then
sh ./configure.am "$@"
else
perl ./cmake/configure.pl "$@"
fi
This diff is collapsed.
......@@ -19,7 +19,8 @@ AUTOMAKE_OPTIONS = foreign
# These are built from source in the Docs directory
EXTRA_DIST = INSTALL-SOURCE INSTALL-WIN-SOURCE \
README COPYING EXCEPTIONS-CLIENT CMakeLists.txt
README COPYING EXCEPTIONS-CLIENT \
CMakeLists.txt configure.cmake config.h.cmake BUILD-CMAKE
SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
@readline_topdir@ sql-common scripts \
......@@ -28,8 +29,8 @@ SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
@sql_server@ @man_dirs@ tests \
netware @libmysqld_dirs@ \
mysql-test support-files sql-bench \
win
win \
cmake
DIST_SUBDIRS = . include Docs zlib \
cmd-line-utils sql-common scripts \
pstack libservices \
......@@ -38,6 +39,7 @@ DIST_SUBDIRS = . include Docs zlib \
netware libmysqld \
mysql-test support-files sql-bench \
win \
cmake \
BUILD
DISTCLEANFILES = ac_available_languages_fragment
......@@ -58,6 +60,7 @@ dist-hook:
--datadir=$(distdir)/win/data \
--srcdir=$(top_srcdir)
storage/myisam/myisamchk --silent --fast $(distdir)/win/data/mysql/*.MYI
test ! -f configure.am || $(INSTALL_DATA) configure.am $(distdir)
all-local: @ABI_CHECK@
......
......@@ -12,67 +12,60 @@
# 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
INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/extra/yassl/include
${CMAKE_SOURCE_DIR}/libmysql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/strings)
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include
${ZLIB_INCLUDE_DIR}
${SSL_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/libmysql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/strings
${READLINE_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc ../mysys/my_conio.c)
ADD_DEFINITIONS(${READLINE_DEFINES})
ADD_DEFINITIONS(${SSL_DEFINES})
MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc)
TARGET_LINK_LIBRARIES(mysql mysqlclient)
IF(UNIX)
TARGET_LINK_LIBRARIES(mysql ${READLINE_LIBRARY})
ENDIF(UNIX)
ADD_EXECUTABLE(mysqltest mysqltest.cc)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc)
SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqltest mysqlclient mysys regex dbug)
TARGET_LINK_LIBRARIES(mysqltest mysqlclient regex)
ADD_EXECUTABLE(mysqlcheck mysqlcheck.c)
MYSQL_ADD_EXECUTABLE(mysqlcheck mysqlcheck.c)
TARGET_LINK_LIBRARIES(mysqlcheck mysqlclient)
ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c ../mysys/mf_getdate.c)
MYSQL_ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c)
TARGET_LINK_LIBRARIES(mysqldump mysqlclient)
ADD_EXECUTABLE(mysqlimport mysqlimport.c)
MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c)
TARGET_LINK_LIBRARIES(mysqlimport mysqlclient)
ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c ../mysys/my_getpagesize.c)
MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c)
TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient)
ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs)
ADD_EXECUTABLE(mysqlshow mysqlshow.c)
MYSQL_ADD_EXECUTABLE(mysqlshow mysqlshow.c)
TARGET_LINK_LIBRARIES(mysqlshow mysqlclient)
ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc
../mysys/mf_tempdir.c
../mysys/my_new.cc
../mysys/my_bit.c
../mysys/my_bitmap.c
../mysys/my_vle.c
../mysys/base64.c)
MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc)
TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient)
ADD_EXECUTABLE(mysqladmin mysqladmin.cc)
MYSQL_ADD_EXECUTABLE(mysqladmin mysqladmin.cc)
TARGET_LINK_LIBRARIES(mysqladmin mysqlclient)
ADD_EXECUTABLE(mysqlslap mysqlslap.c)
MYSQL_ADD_EXECUTABLE(mysqlslap mysqlslap.c)
SET_SOURCE_FILES_PROPERTIES(mysqlslap.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys zlib dbug)
TARGET_LINK_LIBRARIES(mysqlslap mysqlclient)
ADD_EXECUTABLE(echo echo.c)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("mysql" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqltest" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqlcheck" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqldump" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqlimport" "asInvoker")
MYSQL_EMBED_MANIFEST("mysql_upgrade" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqlshow" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqlbinlog" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqladmin" "asInvoker")
MYSQL_EMBED_MANIFEST("echo" "asInvoker")
ENDIF(EMBED_MANIFESTS)
SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap
PROPERTIES HAS_CXX TRUE)
......@@ -34,7 +34,7 @@
enum options_client
{
OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,
OPT_PAGER, OPT_NOPAGER, OPT_TEE, OPT_NOTEE,
OPT_PAGER, OPT_TEE,
OPT_LOW_PRIORITY, OPT_AUTO_REPAIR, OPT_COMPRESS,
OPT_DROP, OPT_LOCKS, OPT_KEYWORDS, OPT_DELAYED, OPT_OPTIMIZE,
OPT_FTB, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_TABLES,
......@@ -48,8 +48,8 @@ enum options_client
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION,
OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS, OPT_SERVER_ARG,
OPT_START_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SERVER_ARG,
OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT,
#ifdef HAVE_NDBCLUSTER_DB
OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
......
......@@ -1373,7 +1373,7 @@ static struct my_option my_long_options[] =
(uchar**) &opt_rehash, (uchar**) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
0, 0},
{"no-auto-rehash", 'A',
"No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect. WARNING: options deprecated; use --disable-auto-rehash instead.",
"No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"auto-vertical-output", OPT_AUTO_VERTICAL_OUTPUT,
"Automatically switch to vertical output mode if the result is wider than the terminal width.",
......@@ -1425,9 +1425,6 @@ static struct my_option my_long_options[] =
"Enable named commands. Named commands mean this program's internal commands; see mysql> help . When enabled, the named commands can be used from any line of the query, otherwise only from the first line, before an enter. Disable with --disable-named-commands. This option is disabled by default.",
(uchar**) &named_cmds, (uchar**) &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0},
{"no-named-commands", 'g',
"Named commands are disabled. Use \\* form only, or use named commands only in the beginning of a line ending with a semicolon (;) Since version 10.9 the client now starts with this option ENABLED by default! Disable with '-G'. Long format commands still work from the first line. WARNING: option deprecated; use --disable-named-commands instead.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"ignore-spaces", 'i', "Ignore space after function names.",
(uchar**) &ignore_spaces, (uchar**) &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0},
......@@ -1449,7 +1446,7 @@ static struct my_option my_long_options[] =
{"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
(uchar**) &line_numbers, (uchar**) &line_numbers, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0},
{"skip-line-numbers", 'L', "Don't write line number for errors. WARNING: -L is deprecated, use long version of this option instead.", 0, 0, 0, GET_NO_ARG,
{"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"unbuffered", 'n', "Flush buffer after each query.", (uchar**) &unbuffered,
(uchar**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
......@@ -1457,11 +1454,8 @@ static struct my_option my_long_options[] =
(uchar**) &column_names, (uchar**) &column_names, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0},
{"skip-column-names", 'N',
"Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead.",
"Don't write column names in results.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"set-variable", 'O',
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"sigint-ignore", OPT_SIGINT_IGNORE, "Ignore SIGINT (CTRL-C)",
(uchar**) &opt_sigint_ignore, (uchar**) &opt_sigint_ignore, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0},
......@@ -1472,9 +1466,6 @@ static struct my_option my_long_options[] =
{"pager", OPT_PAGER,
"Pager to use to display results. If you don't supply an option the default pager is taken from your ENV variable PAGER. Valid pagers are less, more, cat [> filename], etc. See interactive help (\\h) also. This option does not work in batch mode. Disable with --disable-pager. This option is disabled by default.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"no-pager", OPT_NOPAGER,
"Disable pager and print to stdout. See interactive help (\\h) also. WARNING: option deprecated; use --disable-pager instead.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"password", 'p',
"Password to use when connecting to server. If password is not given it's asked from the tty.",
......@@ -1520,8 +1511,6 @@ static struct my_option my_long_options[] =
{"tee", OPT_TEE,
"Append everything into outfile. See interactive help (\\h) also. Does not work in batch mode. Disable with --disable-tee. This option is disabled by default.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. WARNING: option deprecated; use --disable-tee instead", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
#ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", (uchar**) &current_user,
(uchar**) &current_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
......@@ -1660,11 +1649,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
else
init_tee(argument);
break;
case OPT_NOTEE:
printf("WARNING: option deprecated; use --disable-tee instead.\n");
if (opt_outfile)
end_tee();
break;
case OPT_PAGER:
if (argument == disabled_my_option)
opt_nopager= 1;
......@@ -1683,10 +1667,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
opt_nopager= 1;
}
break;
case OPT_NOPAGER:
printf("WARNING: option deprecated; use --disable-pager instead.\n");
opt_nopager= 1;
break;
case OPT_MYSQL_PROTOCOL:
#ifndef EMBEDDED_LIBRARY
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
......
......@@ -1077,11 +1077,6 @@ static struct my_option my_long_options[] =
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
(uchar**) &port, (uchar**) &port, 0, GET_INT, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
{"position", 'j', "Deprecated. Use --start-position instead.",
(uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
(ulonglong)(~(uint32)0), 0, 0, 0},
{"protocol", OPT_MYSQL_PROTOCOL,
"The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
......@@ -1120,7 +1115,7 @@ static struct my_option my_long_options[] =
"(you should probably use quotes for your shell to set it properly).",
(uchar**) &start_datetime_str, (uchar**) &start_datetime_str,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"start-position", OPT_START_POSITION,
{"start-position", 'j',
"Start reading the binlog at position N. Applies to the first binlog "
"passed on the command line.",
(uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
......
......@@ -184,9 +184,6 @@ HASH ignore_table;
static struct my_option my_long_options[] =
{
{"all", 'a', "Deprecated. Use --create-options instead.",
(uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1,
0, 0, 0, 0, 0},
{"all-databases", 'A',
"Dump all the databases. This will be same as --databases with all databases selected.",
(uchar**) &opt_alldbs, (uchar**) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
......@@ -239,7 +236,7 @@ static struct my_option my_long_options[] =
{"compress", 'C', "Use compression in server/client protocol.",
(uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
{"create-options", OPT_CREATE_OPTIONS,
{"create-options", 'a',
"Include all MySQL specific create options.",
(uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1,
0, 0, 0, 0, 0},
......@@ -304,9 +301,6 @@ static struct my_option my_long_options[] =
(uchar**) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
{"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...",
(uchar**) &escaped, (uchar**) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"first-slave", 'x', "Deprecated, renamed to --lock-all-tables.",
(uchar**) &opt_lock_all_tables, (uchar**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0},
{"flush-logs", 'F', "Flush logs file in server before starting dump. "
"Note that if you dump many databases at once (using the option "
"--databases= or --all-databases), the logs will be flushed for "
......@@ -394,8 +388,7 @@ static struct my_option my_long_options[] =
NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-data", 'd', "No row information.", (uchar**) &opt_no_data,
(uchar**) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-set-names", 'N',
"Deprecated. Use --skip-set-charset instead.",
{"no-set-names", 'N', "Same as--skip-set-charset.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"opt", OPT_OPTIMIZE,
"Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt.",
......@@ -433,9 +426,6 @@ static struct my_option my_long_options[] =
"Add 'SET NAMES default_character_set' to the output.",
(uchar**) &opt_set_charset, (uchar**) &opt_set_charset, 0, GET_BOOL, NO_ARG, 1,
0, 0, 0, 0, 0},
{"set-variable", 'O',
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_SMEM
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
"Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
......
This diff is collapsed.
EXTRA_DIST = \
cmake_parse_arguments.cmake \
package_name.cmake \
configurable_file_content.in \
check_minimal_version.cmake \
create_initial_db.cmake.in \
make_dist.cmake.in \
dtrace.cmake \
abi_check.cmake \
bison.cmake \
configure.pl \
character_sets.cmake \
libutils.cmake \
readline.cmake \
mysql_version.cmake \
install_macros.cmake \
ssl.cmake \
plugin.cmake \
zlib.cmake \
stack_direction.c \
do_abi_check.cmake \
merge_archives_unix.cmake.in \
dtrace_prelink.cmake \
versioninfo.rc.in \
mysql_add_executable.cmake \
install_layout.cmake \
build_configurations/mysql_release.cmake \
os/Windows.cmake \
os/WindowsCache.cmake \
os/Linux.cmake \
os/SunOS.cmake \
os/Darwin.cmake \
os/HP-UX.cmake \
os/AIX.cmake \
os/OS400.cmake \
os/Cygwin.cmake
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
#
# Headers which need to be checked for abi/api compatibility.
# API_PREPROCESSOR_HEADER will be used until mysql_priv.h stablizes
# after which TEST_PREPROCESSOR_HEADER will be used.
#
# We use gcc specific preprocessing command and sed/diff, so it will
# only be run on Unix and only if gcc is used.
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_NAME MATCHES "Linux")
IF(CMAKE_C_COMPILER MATCHES "ccache$")
SET(COMPILER ${CMAKE_C_COMPILER_ARG1})
STRING(REGEX REPLACE "^ " "" COMPILER ${COMPILER})
ELSE()
SET(COMPILER ${CMAKE_C_COMPILER})
ENDIF()
SET(API_PREPROCESSOR_HEADER
${CMAKE_SOURCE_DIR}/include/mysql/plugin.h
${CMAKE_SOURCE_DIR}/include/mysql.h
${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v1.h
${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v2.h
)
SET(TEST_PREPROCESSOR_HEADER
${CMAKE_SOURCE_DIR}/sql/mysql_priv.h
)
ADD_CUSTOM_TARGET(abi_check ALL
COMMAND ${CMAKE_COMMAND}
-DCOMPILER=${COMPILER}
-DSOURCE_DIR=${CMAKE_SOURCE_DIR}
-DBINARY_DIR=${CMAKE_BINARY_DIR}
"-DABI_HEADERS=${API_PREPROCESSOR_HEADER}"
-P ${CMAKE_SOURCE_DIR}/cmake/do_abi_check.cmake
VERBATIM
)
ADD_CUSTOM_TARGET(abi_check_all
COMMAND ${CMAKE_COMMAND}
-DCMAKE_C_COMPILER=${COMPILER}
-DCMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR}
-DCMAKE_BINARY_DIR=${CMAKE_BINARY_DIR}
"-DABI_HEADERS=${TEST_PREPROCESSOR_HEADER}"
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/do_abi_check.cmake
VERBATIM
)
ENDIF()
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
# On Solaris, /opt/csw often contains a newer bison
IF(NOT BISON_EXECUTABLE AND EXISTS /opt/csw/bin/bison)
SET(BISON_EXECUTABLE /opt/csw/bin/bison)
ENDIF()
ENDIF()
FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
MARK_AS_ADVANCED(BISON_EXECUTABLE "")
IF(NOT BISON_EXECUTABLE)
MESSAGE("Warning: Bison executable not found in PATH")
ELSEIF(BISON_EXECUTABLE AND NOT BISON_USABLE)
# Check version as well
EXEC_PROGRAM(${BISON_EXECUTABLE} ARGS --version OUTPUT_VARIABLE BISON_VERSION_STR)
# Get first line in case it's multiline
STRING(REGEX REPLACE "([^\n]+).*" "\\1" FIRST_LINE "${BISON_VERSION_STR}")
# get version information
STRING(REGEX REPLACE ".* ([0-9]+)\\.([0-9]+)" "\\1" BISON_VERSION_MAJOR "${FIRST_LINE}")
STRING(REGEX REPLACE ".* ([0-9]+)\\.([0-9]+)" "\\2" BISON_VERSION_MINOR "${FIRST_LINE}")
IF (BISON_VERSION_MAJOR LESS 2)
MESSAGE("Warning: bison version is old. please update to version 2")
ELSE()
SET(BISON_USABLE 1 CACHE INTERNAL "Bison version 2 or higher")
ENDIF()
ENDIF()
# Use bison to generate C++ and header file
MACRO (RUN_BISON input_yy output_cc output_h)
IF(BISON_TOO_OLD)
IF(EXISTS ${output_cc} AND EXISTS ${output_h})
SET(BISON_USABLE FALSE)
ENDIF()
ENDIF()
IF(BISON_USABLE)
ADD_CUSTOM_COMMAND(
OUTPUT ${output_cc}
${output_h}
COMMAND ${BISON_EXECUTABLE} -y -p MYSQL
--output=${output_cc}
--defines=${output_h}
${input_yy}
DEPENDS ${input_yy}
)
ELSE()
# Bison is missing or not usable, e.g too old
IF(EXISTS ${output_cc} AND EXISTS ${output_h})
IF(${input_yy} IS_NEWER_THAN ${output_cc} OR ${input_yy} IS_NEWER_THAN ${output_h})
# Possibly timestamps are messed up in source distribution.
MESSAGE("Warning: no usable bison found, ${input_yy} will not be rebuilt.")
ENDIF()
ELSE()
# Output files are missing, bail out.
SET(ERRMSG
"Bison (GNU parser generator) is required to build MySQL."
"Please install bison."
)
IF(WIN32)
SET(ERRMSG ${ERRMSG}
"You can download bison from http://gnuwin32.sourceforge.net/packages/bison.htm "
"Choose 'Complete package, except sources' installation. We recommend to "
"install bison into a directory without spaces, e.g C:\\GnuWin32.")
ENDIF()
MESSAGE(FATAL_ERROR ${ERRMSG})
ENDIF()
ENDIF()
ENDMACRO()
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# This file includes build settings used for MySQL release
SET(FEATURE_SET "community" CACHE STRING
" Selection of features. Options are
- xsmall :
- small: embedded
- classic: embedded + archive + federated + blackhole
- large : embedded + archive + federated + blackhole + innodb
- xlarge: embedded + archive + federated + blackhole + innodb + partition
- community: all features (currently == xlarge)
"
)
SET(FEATURE_SET_xsmall 1)
SET(FEATURE_SET_small 2)
SET(FEATURE_SET_classic 3)
SET(FEATURE_SET_large 5)
SET(FEATURE_SET_xlarge 6)
SET(FEATURE_SET_community 7)
IF(FEATURE_SET)
STRING(TOLOWER ${FEATURE_SET} feature_set)
SET(num ${FEATURE_SET_${feature_set}})
IF(NOT num)
MESSAGE(FATAL_ERROR "Invalid FEATURE_SET option '${feature_set}'.
Should be xsmall, small, classic, large, or community
")
ENDIF()
SET(WITH_PARTITION_STORAGE_ENGINE OFF)
IF(num EQUAL FEATURE_SET_xsmall)
SET(WITH_NONE ON)
ENDIF()
IF(num GREATER FEATURE_SET_xsmall)
SET(WITH_EMBEDDED_SERVER ON CACHE BOOL "")
ENDIF()
IF(num GREATER FEATURE_SET_small)
SET(WITH_ARCHIVE_STORAGE_ENGINE ON)
SET(WITH_BLACKHOLE_STORAGE_ENGINE ON)
SET(WITH_FEDERATED_STORAGE_ENGINE ON)
ENDIF()
IF(num GREATER FEATURE_SET_classic)
SET(WITH_INNOBASE_STORAGE_ENGINE ON)
ENDIF()
IF(num GREATER FEATURE_SET_large)
SET(WITH_PARTITION_STORAGE_ENGINE ON)
ENDIF()
IF(num GREATER FEATURE_SET_xlarge)
# OPTION(WITH_ALL ON)
# better no set this, otherwise server would be linked
# statically with experimental stuff like audit_null
ENDIF()
# Update cache with current values, remove engines we do not care about
# from build.
FOREACH(eng ARCHIVE BLACKHOLE FEDERATED INNOBASE PARTITION EXAMPLE)
IF(NOT WITH_${eng}_STORAGE_ENGINE)
SET(WITHOUT_${eng}_STORAGE_ENGINE ON CACHE BOOL "")
MARK_AS_ADVANCED(WITHOUT_${eng}_STORAGE_ENGINE)
SET(WITH_${eng}_STORAGE_ENGINE OFF CACHE BOOL "")
ELSE()
SET(WITH_${eng}_STORAGE_ENGINE ON CACHE BOOL "")
ENDIF()
ENDFOREACH()
ENDIF()
OPTION(ENABLE_LOCAL_INFILE "" ON)
SET(WITH_SSL bundled CACHE STRING "")
SET(WITH_ZLIB bundled CACHE STRING "")
IF(NOT COMPILATION_COMMENT)
SET(COMPILATION_COMMENT "MySQL Community Server (GPL)")
ENDIF()
IF(WIN32)
# Sign executables with authenticode certificate
SET(SIGNCODE 1 CACHE BOOL "")
ENDIF()
IF(UNIX)
SET(WITH_EXTRA_CHARSETS all CACHE STRING "")
IF(EXISTS "${CMAKE_SOURCE_DIR}/COPYING")
OPTION(WITH_READLINE "" ON)
ELSE()
OPTION(WITH_LIBEDIT "" ON)
ENDIF()
OPTION(WITH_PIC "" ON) # Why?
ENDIF()
# Compiler options
IF(UNIX)
# Default GCC flags
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti")
ENDIF()
# HPUX flags
IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
IF(CMAKE_C_COMPILER_ID MATCHES "HP")
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g +O2 +DD64 +DSitanium2 -mt -AC99")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g +O2 +DD64 +DSitanium2 -mt -Aa")
ENDIF()
ENDIF()
SET(WITH_SSL)
ENDIF()
# Linux flags
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict")
ENDIF()
ENDIF()
# OSX flags
IF(APPLE)
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
ENDIF()
# Solaris flags
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
IF(CMAKE_SYSTEM_VERSION VERSION_GREATER "5.9")
# Link mysqld with mtmalloc on Solaris 10 and later
SET(WITH_MYSQLD_LDFLAGS "-lmtmalloc" CACHE STRING "")
ENDIF()
IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
IF(CMAKE_SIZEOF_VOIDP EQUAL 4)
# Solaris x86
SET(CMAKE_C_FLAGS_RELWITHDEBINFO
"-g -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-g0 -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
ELSE()
# Solaris x64
SET(CMAKE_C_FLAGS_RELWITHDEBINFO
"-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-g0 -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
ENDIF()
ELSE()
IF(CMAKE_SIZEOF_VOIDP EQUAL 4)
# Solaris sparc 32 bit
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -xO3 -Xa -xstrconst -mt -xarch=sparc")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g0 -xO3 -noex -mt -xarch=sparc")
ELSE()
# Solaris sparc 64 bit
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -xO3 -Xa -xstrconst -mt")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g0 -xO3 -noex -mt")
ENDIF()
ENDIF()
ENDIF()
ENDIF()
IF(CMAKE_CXX_FLAGS_RELWITHDEBINFO)
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
CACHE STRING "Compile flags")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}"
CACHE STRING "Compile flags")
ENDIF()
ENDIF()
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# Concatenate files
#
# Parameters :
# IN - input files (list)
# OUT - output file
FILE(WRITE ${OUT} "")
FOREACH(FILENAME ${IN})
FILE(READ ${FILENAME} CONTENTS)
FILE(APPEND ${OUT} "${CONTENTS}")
ENDFOREACH()
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
#Charsets and collations
IF(NOT DEFAULT_CHARSET)
SET(DEFAULT_CHARSET "latin1")
ENDIF()
IF(NOT DEFAULT_COLLATIONS)
SET(DEFAULT_COLLATION "latin1_swedish_ci")
ENDIF()
SET(CHARSETS ${DEFAULT_CHARSET} latin1 utf8 utf8mb3)
SET(CHARSETS_COMPLEX big5 cp1250 cp932 eucjpms euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8 utf8mb3 utf16 utf32)
SET(CHARSETS_AVAILABLE
binary armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257
cp850 cp852 cp866 cp932 dec8 eucjpms euckr gb2312 gbk geostd8
greek hebrew hp8 keybcs2 koi8r koi8u
latin1 latin2 latin5 latin7 macce macroman
sjis swe7 tis620 ucs2 ujis utf8 utf8mb3 utf16 utf32)
SET (EXTRA_CHARSETS "all")
SET(WITH_EXTRA_CHARSETS ${EXTRA_CHARSETS} CACHE
STRING "Options are: none, complex, all")
IF(WITH_EXTRA_CHARSETS MATCHES "complex")
SET(CHARSETS ${CHARSETS} ${CHARSETS_COMPLEX})
ELSEIF(WITH_EXTRA_CHARSETS MATCHES "all")
SET(CHARSETS ${CHARSETS} ${CHARSETS_AVAILABLE})
ENDIF()
SET(MYSQL_DEFAULT_CHARSET_NAME "${DEFAULT_CHARSET}")
SET(MYSQL_DEFAULT_COLLATION_NAME "${DEFAULT_COLLATION}")
FOREACH(cs in ${CHARSETS})
SET(HAVE_CHARSET_${cs} 1)
ENDFOREACH()
SET(HAVE_UCA_COLLATIONS 1)
SET(HAVE_UTF8_GENERAL_CS 1)
SET(USE_MB 1)
SET(USE_MB_IDENT 1)
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# This is a helper script is used to check for the minimal required version
# It helps to decide whether to use autoconf based configure or cmake's
# configure
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
# Copyright (C) 2007 MySQL AB, 2009 Sun Microsystems,Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# Handy macro to parse macro arguments
MACRO(CMAKE_PARSE_ARGUMENTS prefix arg_names option_names)
SET(DEFAULT_ARGS)
FOREACH(arg_name ${arg_names})
SET(${prefix}_${arg_name})
ENDFOREACH(arg_name)
FOREACH(option ${option_names})
SET(${prefix}_${option} FALSE)
ENDFOREACH(option)
SET(current_arg_name DEFAULT_ARGS)
SET(current_arg_list)
FOREACH(arg ${ARGN})
SET(larg_names ${arg_names})
LIST(FIND larg_names "${arg}" is_arg_name)
IF (is_arg_name GREATER -1)
SET(${prefix}_${current_arg_name} ${current_arg_list})
SET(current_arg_name ${arg})
SET(current_arg_list)
ELSE (is_arg_name GREATER -1)
SET(loption_names ${option_names})
LIST(FIND loption_names "${arg}" is_option)
IF (is_option GREATER -1)
SET(${prefix}_${arg} TRUE)
ELSE (is_option GREATER -1)
SET(current_arg_list ${current_arg_list} ${arg})
ENDIF (is_option GREATER -1)
ENDIF (is_arg_name GREATER -1)
ENDFOREACH(arg)
SET(${prefix}_${current_arg_name} ${current_arg_list})
ENDMACRO()
\ No newline at end of file
@CMAKE_CONFIGURABLE_FILE_CONTENT@
#!/usr/bin/perl
use strict;
use Cwd 'abs_path';
use File::Basename;
my $cmakeargs = "";
# Find source root directory
# Assume this script is in <srcroot>/cmake
my $srcdir = dirname(dirname(abs_path($0)));
my $cmake_install_prefix="";
# Sets installation directory, bindir, libdir, libexecdir etc
# the equivalent CMake variables are given without prefix
# e.g if --prefix is /usr and --bindir is /usr/bin
# then cmake variable (INSTALL_BINDIR) must be just "bin"
sub set_installdir
{
my($path, $varname) = @_;
my $prefix_length = length($cmake_install_prefix);
if (($prefix_length > 0) && (index($path,$cmake_install_prefix) == 0))
{
# path is under the prefix, so remove the prefix and maybe following "/"
$path = substr($path, $prefix_length);
if(length($path) > 0)
{
my $char = substr($path, 0, 1);
if($char eq "/")
{
$path= substr($path, 1);
}
}
if(length($path) > 0)
{
$cmakeargs = $cmakeargs." -D".$varname."=".$path;
}
}
}
# CMake understands CC and CXX env.variables correctly, if they contain 1 or 2 tokens
# e.g CXX=gcc and CXX="ccache gcc" are ok. However it could have a problem if there
# (recognizing gcc) with more tokens ,e.g CXX="ccache gcc --pipe".
# The problem is simply fixed by splitting compiler and flags, e.g
# CXX="ccache gcc --pipe" => CXX=ccache gcc CXXFLAGS=--pipe
sub check_compiler
{
my ($varname, $flagsvarname) = @_;
my @tokens = split(/ /,$ENV{$varname});
if($#tokens >= 2)
{
$ENV{$varname} = $tokens[0]." ".$tokens[1];
my $flags;
for(my $i=2; $i<=$#tokens; $i++)
{
$flags= $flags." ".$tokens[$i];
}
if(defined $ENV{$flagsvarname})
{
$flags = $flags." ".$ENV{$flagsvarname};
}
$ENV{$flagsvarname}=$flags;
print("$varname=$ENV{$varname}\n");
print("$flagsvarname=$ENV{$flagsvarname}\n");
}
}
check_compiler("CC", "CFLAGS");
check_compiler("CXX", "CXXFLAGS");
foreach my $option (@ARGV)
{
if (substr ($option, 0, 2) eq "--")
{
$option = substr($option, 2);
}
else
{
# This must be environment variable
my @v = split('=', $option);
my $name = shift(@v);
if(@v)
{
$ENV{$name} = join('=', @v);
}
next;
}
if($option =~ /srcdir/)
{
$srcdir = substr($option,7);
next;
}
if($option =~ /help/)
{
system("cmake ${srcdir} -LH");
exit(0);
}
if($option =~ /with-plugins=/)
{
my @plugins= split(/,/, substr($option,13));
foreach my $p (@plugins)
{
$p =~ s/-/_/g;
$cmakeargs = $cmakeargs." -DWITH_".uc($p)."=1";
}
next;
}
if($option =~ /with-extra-charsets=/)
{
my $charsets= substr($option,20);
$cmakeargs = $cmakeargs." -DWITH_EXTRA_CHARSETS=".$charsets;
next;
}
if($option =~ /without-plugin=/)
{
$cmakeargs = $cmakeargs." -DWITHOUT_".uc(substr($option,15))."=1";
next;
}
if($option =~ /with-zlib-dir=bundled/)
{
$cmakeargs = $cmakeargs." -DWITH_ZLIB=bundled";
next;
}
if($option =~ /with-zlib-dir=/)
{
$cmakeargs = $cmakeargs." -DWITH_ZLIB=system";
next;
}
if($option =~ /with-ssl=/)
{
$cmakeargs = $cmakeargs." -DWITH_SSL=bundled";
next;
}
if($option =~ /with-ssl/)
{
$cmakeargs = $cmakeargs." -DWITH_SSL=yes";
next;
}
if($option =~ /prefix=/)
{
$cmake_install_prefix= substr($option, 7);
$cmakeargs = $cmakeargs." -DCMAKE_INSTALL_PREFIX=".$cmake_install_prefix;
next;
}
if($option =~/bindir=/)
{
set_installdir(substr($option,7), "INSTALL_BINDIR");
next;
}
if($option =~/libdir=/)
{
set_installdir(substr($option,7), "INSTALL_LIBDIR");
next;
}
if($option =~/libexecdir=/)
{
set_installdir(substr($option,11), "INSTALL_SBINDIR");
next;
}
if($option =~/includedir=/)
{
set_installdir(substr($option,11), "INSTALL_INCLUDEDIR");
next;
}
if ($option =~ /extra-charsets=all/)
{
$cmakeargs = $cmakeargs." -DWITH_CHARSETS=all";
next;
}
if ($option =~ /extra-charsets=complex/)
{
$cmakeargs = $cmakeargs." -DWITH_CHARSETS=complex";
next;
}
if ($option =~ /localstatedir=/)
{
$cmakeargs = $cmakeargs." -DMYSQL_DATADIR=".substr($option,14);
next;
}
$option = uc($option);
$option =~ s/-/_/g;
$cmakeargs = $cmakeargs." -D".$option."=1";
}
print("configure.pl : calling cmake $srcdir $cmakeargs\n");
my $rc = system("cmake $srcdir $cmakeargs");
exit($rc);
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# This script creates initial database for packaging on Windows
SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@")
SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@")
SET(MYSQLD_EXECUTABLE "@MYSQLD_EXECUTABLE@")
SET(CMAKE_CFG_INTDIR "@CMAKE_CFG_INTDIR@")
SET(WIN32 "@WIN32@")
# Force Visual Studio to output to stdout
IF(ENV{VS_UNICODE_OUTPUT})
SET ($ENV{VS_UNICODE_OUTPUT})
ENDIF()
IF(CMAKE_CFG_INTDIR AND CONFIG)
#Resolve build configuration variables
STRING(REPLACE "${CMAKE_CFG_INTDIR}" ${CONFIG} MYSQLD_EXECUTABLE
"${MYSQLD_EXECUTABLE}")
ENDIF()
# Create bootstrapper SQL script
FILE(WRITE bootstrap.sql "use mysql;\n" )
FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql
fill_help_tables.sql)
FILE(STRINGS ${CMAKE_SOURCE_DIR}/scripts/${FILENAME} CONTENTS)
FOREACH(STR ${CONTENTS})
IF(NOT STR MATCHES "@current_hostname")
FILE(APPEND bootstrap.sql "${STR}\n")
ENDIF()
ENDFOREACH()
ENDFOREACH()
FILE(REMOVE_RECURSE mysql)
MAKE_DIRECTORY(mysql)
IF(WIN32)
SET(CONSOLE --console)
ENDIF()
SET(BOOTSTRAP_COMMAND
${MYSQLD_EXECUTABLE}
--no-defaults
${CONSOLE}
--bootstrap
--lc-messages-dir=${CMAKE_CURRENT_BINARY_DIR}/share
--basedir=.
--datadir=.
--loose-skip-innodb
--loose-skip-ndbcluster
--max_allowed_packet=8M
--net_buffer_length=16K
)
GET_FILENAME_COMPONENT(CWD . ABSOLUTE)
EXECUTE_PROCESS(
COMMAND "@CMAKE_COMMAND@" -E echo Executing ${BOOTSTRAP_COMMAND}
)
EXECUTE_PROCESS (
COMMAND "@CMAKE_COMMAND@" -E echo input file bootstrap.sql, current directory ${CWD}
)
EXECUTE_PROCESS (
COMMAND ${BOOTSTRAP_COMMAND} INPUT_FILE bootstrap.sql OUTPUT_VARIABLE OUT
ERROR_VARIABLE ERR
RESULT_VARIABLE RESULT
)
IF(NOT RESULT EQUAL 0)
MESSAGE(FATAL_ERROR "Could not create initial database \n ${OUT} \n ${ERR}")
ENDIF()
\ No newline at end of file
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
#
# Rules for checking that the abi/api has not changed.
#
# The following steps are followed in the do_abi_check rule below
#
# 1) Generate preprocessor output for the files that need to
# be tested for abi/api changes. use -nostdinc to prevent
# generation of preprocessor output for system headers. This
# results in messages in stderr saying that these headers
# were not found. Redirect the stderr output to /dev/null
# to prevent seeing these messages.
# 2) sed the output to
# 2.1) remove blank lines and lines that begin with "# "
# 2.2) When gcc -E is run on the Mac OS and solaris sparc platforms it
# introduces a line of output that shows up as a difference between
# the .pp and .out files. Remove these OS specific preprocessor text
# inserted by the preprocessor.
# 3) diff the generated file and the canons (.pp files already in
# the repository).
# 4) delete the .out file that is generated.
#
# If the diff fails, the generated file is not removed. This will
# be useful for analysis of ABI differences (e.g. using a visual
# diff tool).
#
# A ABI change that causes a build to fail will always be accompanied
# by new canons (.out files). The .out files that are not removed will
# be replaced as the new .pp files.
#
# e.g. If include/mysql/plugin.h has an ABI change then this rule would
# leave a <build directory>/abi_check.out file.
#
# A developer with a justified API change will then do a
# mv <build directory>/abi_check.out include/mysql/plugin.pp
# to replace the old canons with the new ones.
#
SET(abi_check_out ${BINARY_DIR}/abi_check.out)
FOREACH(file ${ABI_HEADERS})
SET(tmpfile ${file}.pp.tmp)
EXECUTE_PROCESS(
COMMAND ${COMPILER}
-E -nostdinc -dI -I${SOURCE_DIR}/include -I${BINARY_DIR}/include
-I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql ${file}
ERROR_QUIET OUTPUT_FILE ${tmpfile})
EXECUTE_PROCESS(
COMMAND sed -e
"/^# /d" -e "/^[ ]*$/d" -e "/^#pragma GCC set_debug_pwd/d" -e "/^#ident/d"
RESULT_VARIABLE result OUTPUT_FILE ${abi_check_out} INPUT_FILE ${tmpfile})
IF(NOT ${result} EQUAL 0)
MESSAGE(FATAL_ERROR "sed returned error ${result}")
ENDIF()
FILE(REMOVE ${tmpfile})
EXECUTE_PROCESS(COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE
result)
IF(NOT ${result} EQUAL 0)
MESSAGE(FATAL_ERROR
"ABI check found difference between ${file}.pp and ${abi_check_out}")
ENDIF()
FILE(REMOVE ${abi_check_out})
ENDFOREACH()
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# Check if OS supports DTrace
MACRO(CHECK_DTRACE)
FIND_PROGRAM(DTRACE dtrace)
MARK_AS_ADVANCED(DTRACE)
# On FreeBSD, dtrace does not handle userland tracing yet
IF(DTRACE AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace")
ENDIF()
SET(HAVE_DTRACE ${ENABLE_DTRACE})
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
SET(DTRACE_FLAGS -32 CACHE INTERNAL "DTrace architecture flags")
ELSE()
SET(DTRACE_FLAGS -64 CACHE INTERNAL "DTrace architecture flags")
ENDIF()
ENDIF()
ENDMACRO()
CHECK_DTRACE()
# Produce a header file with
# DTrace macros
MACRO (DTRACE_HEADER provider header header_no_dtrace)
IF(ENABLE_DTRACE)
ADD_CUSTOM_COMMAND(
OUTPUT ${header} ${header_no_dtrace}
COMMAND ${DTRACE} -h -s ${provider} -o ${header}
COMMAND perl ${CMAKE_SOURCE_DIR}/scripts/dheadgen.pl -f ${provider} > ${header_no_dtrace}
DEPENDS ${provider}
)
ENDIF()
ENDMACRO()
# Create provider headers
IF(ENABLE_DTRACE)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/probes_mysql.d.base
${CMAKE_BINARY_DIR}/include/probes_mysql.d COPYONLY)
DTRACE_HEADER(
${CMAKE_BINARY_DIR}/include/probes_mysql.d
${CMAKE_BINARY_DIR}/include/probes_mysql_dtrace.h
${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h
)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
# Systemtap object
EXECUTE_PROCESS(
COMMAND ${DTRACE} -G -s ${CMAKE_SOURCE_DIR}/include/probes_mysql.d.base
-o ${CMAKE_BINARY_DIR}/probes_mysql.o
)
ENDIF()
ADD_CUSTOM_TARGET(gen_dtrace_header
DEPENDS
${CMAKE_BINARY_DIR}/include/probes_mysql.d
${CMAKE_BINARY_DIR}/include/probes_mysql_dtrace.h
${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h
)
ENDIF()
MACRO(DTRACE_INSTRUMENT target)
IF(ENABLE_DTRACE)
ADD_DEPENDENCIES(${target} gen_dtrace_header)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
TARGET_LINK_LIBRARIES(${target} ${CMAKE_BINARY_DIR}/probes_mysql.o)
ENDIF()
# On Solaris, invoke dtrace -G to generate object file and
# link it together with target.
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
SET(objdir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${target}.dir)
SET(outfile ${objdir}/${target}_dtrace.o)
GET_TARGET_PROPERTY(target_type ${target} TYPE)
ADD_CUSTOM_COMMAND(
TARGET ${target} PRE_LINK
COMMAND ${CMAKE_COMMAND}
-DDTRACE=${DTRACE}
-DOUTFILE=${outfile}
-DDFILE=${CMAKE_BINARY_DIR}/include/probes_mysql.d
-DDTRACE_FLAGS=${DTRACE_FLAGS}
-DDIRS=.
-DTYPE=${target_type}
-P ${CMAKE_SOURCE_DIR}/cmake/dtrace_prelink.cmake
WORKING_DIRECTORY ${objdir}
)
# Add full object path to linker flags
GET_TARGET_PROPERTY(target_type ${target} TYPE)
IF(NOT target_type MATCHES "STATIC")
SET_TARGET_PROPERTIES(${target} PROPERTIES LINK_FLAGS "${outfile}")
ELSE()
# For static library flags, add the object to the library.
# Note: DTrace probes in static libraries are unusable currently
# (see explanation for DTRACE_INSTRUMENT_STATIC_LIBS below)
# but maybe one day this will be fixed.
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
ADD_CUSTOM_COMMAND(
TARGET ${target} POST_BUILD
COMMAND ${CMAKE_AR} r ${target_location} ${outfile}
COMMAND ${CMAKE_RANLIB} ${target_location}
)
# Used in DTRACE_INSTRUMENT_WITH_STATIC_LIBS
SET(TARGET_OBJECT_DIRECTORY_${target} ${objdir} CACHE INTERNAL "")
ENDIF()
ENDIF()
ENDIF()
ENDMACRO()
# Ugly workaround for Solaris' DTrace inability to use probes
# from static libraries, discussed e.g in this thread
# (http://opensolaris.org/jive/thread.jspa?messageID=432454)
# We have to collect all object files that may be instrumented
# and go into the mysqld (also those that come from in static libs)
# run them again through dtrace -G to generate an ELF file that links
# to mysqld.
MACRO (DTRACE_INSTRUMENT_STATIC_LIBS target libs)
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND ENABLE_DTRACE)
FOREACH(lib ${libs})
SET(dirs ${dirs} ${TARGET_OBJECT_DIRECTORY_${lib}})
ENDFOREACH()
SET (obj ${CMAKE_CURRENT_BINARY_DIR}/${target}_dtrace_all.o)
ADD_CUSTOM_COMMAND(
OUTPUT ${obj}
DEPENDS ${libs}
COMMAND ${CMAKE_COMMAND}
-DDTRACE=${DTRACE}
-DOUTFILE=${obj}
-DDFILE=${CMAKE_BINARY_DIR}/include/probes_mysql.d
-DDTRACE_FLAGS=${DTRACE_FLAGS}
"-DDIRS=${dirs}"
-DTYPE=MERGE
-P ${CMAKE_SOURCE_DIR}/cmake/dtrace_prelink.cmake
VERBATIM
)
ADD_CUSTOM_TARGET(${target}_dtrace_all DEPENDS ${obj})
ADD_DEPENDENCIES(${target} ${target}_dtrace_all)
TARGET_LINK_LIBRARIES(${target} ${obj})
ENDIF()
ENDMACRO()
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# Generates an ELF object file with dtrace entry points.
# This object that must to be linked with together with
# the target. This script needs to run on Solaris only
# Do not follow symlinks in GLOB_RECURSE
CMAKE_POLICY(SET CMP0009 NEW)
FILE(REMOVE ${OUTFILE})
MACRO(CONVERT_TO_RELATIVE_PATHS files rel_paths)
GET_FILENAME_COMPONENT(abs_dir . ABSOLUTE)
SET(${rel_paths})
FOREACH(file ${files})
FILE(RELATIVE_PATH rel ${abs_dir} ${file})
LIST(APPEND ${rel_paths} ${rel})
ENDFOREACH()
ENDMACRO()
IF(TYPE STREQUAL "MERGE")
# Rerun dtrace on objects that are already in static libraries.
# Object paths are stored in text files named 'dtrace_objects'
# in the input directores. We have to copy the objects into temp.
# directory, as running dtrace -G on original files will change
# timestamps and cause rebuilds or the libraries / excessive
# relink
FILE(REMOVE_RECURSE dtrace_objects_merge)
MAKE_DIRECTORY(dtrace_objects_merge)
FOREACH(dir ${DIRS})
FILE(STRINGS ${dir}/dtrace_objects OBJS)
FOREACH(obj ${OBJS})
IF(obj)
EXECUTE_PROCESS(COMMAND cp ${obj} dtrace_objects_merge)
ENDIF()
ENDFOREACH()
ENDFOREACH()
FILE(GLOB_RECURSE OBJECTS dtrace_objects_merge/*.o)
CONVERT_TO_RELATIVE_PATHS("${OBJECTS}" REL_OBJECTS)
EXECUTE_PROCESS(
COMMAND ${DTRACE} ${DTRACE_FLAGS} -o ${OUTFILE} -G -s ${DFILE} ${REL_OBJECTS}
)
RETURN()
ENDIF()
FOREACH(dir ${DIRS})
FILE(GLOB_RECURSE OBJECTS ${dir}/*.o)
CONVERT_TO_RELATIVE_PATHS("${OBJECTS}" REL)
LIST(APPEND REL_OBJECTS ${REL})
ENDFOREACH()
FILE(WRITE dtrace_timestamp "")
EXECUTE_PROCESS(
COMMAND ${DTRACE} ${DTRACE_FLAGS} -o ${OUTFILE} -G -s ${DFILE} ${REL_OBJECTS}
)
# Save objects that contain dtrace probes in a file.
# This file is used when script is called with -DTYPE=MERGE
# to dtrace from static libs.
# To find objects with probes, look at the timestamp, it was updated
# by dtrace -G run
IF(TYPE MATCHES "STATIC")
FILE(WRITE dtrace_objects "")
FOREACH(obj ${REL_OBJECTS})
IF(${obj} IS_NEWER_THAN dtrace_timestamp)
GET_FILENAME_COMPONENT(obj_absolute_path ${obj} ABSOLUTE)
FILE(APPEND dtrace_objects "${obj_absolute_path}\n" )
ENDIF()
ENDFOREACH()
ENDIF()
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# The purpose of this file is to set the default installation layout.
# Currently, there are 2 different installation layouts ,
# one is used in tar.gz packages (Windows zip is about the same), another one
# in RPMs.
# There are currently 2 layouts defines, named STANDALONE (tar.gz layout)
# and UNIX (rpm layout). To force a directory layout when invoking cmake use
# -DINSTALL_LAYOUT=[STANDALONE|UNIX].
# This wil use a predefined layout. There is a possibility to further fine-tune
# installation directories. Several variables are can be overwritten
#
# - INSTALL_BINDIR (directory with client executables and Unix shell scripts)
# - INSTALL_SBINDIR (directory with mysqld)
# - INSTALL_LIBDIR (directory with client end embedded libraries)
# - INSTALL_PLUGINDIR (directory for plugins)
# - INSTALL_INCLUDEDIR (directory for MySQL headers)
# - INSTALL_DOCDIR (documentation)
# - INSTALL_MANDIR (man pages)
# - INSTALL_SCRIPTDIR (several scripts, rarely used)
# - INSTALL_MYSQLSHAREDIR (MySQL character sets and localized error messages)
# - INSTALL_SHAREDIR (location of aclocal/mysql.m4)
# - INSTALL_SQLBENCHDIR (sql-bench)
# - INSTALL_MYSQLTESTDIR (mysql-test)
# - INSTALL_DOCREADMEDIR (readme and similar)
# - INSTALL_SUPPORTFILESDIR (used only in standalone installer)
# Default installation layout on Unix is UNIX (kent wants it so)
IF(NOT INSTALL_LAYOUT)
IF(WIN32)
SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
ELSE()
SET(DEFAULT_INSTALL_LAYOUT "UNIX")
ENDIF()
ENDIF()
SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) or UNIX")
IF(NOT INSTALL_LAYOUT MATCHES "STANDALONE")
IF(NOT INSTALL_LAYOUT MATCHES "UNIX")
SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}")
ENDIF()
ENDIF()
IF(UNIX)
IF(INSTALL_LAYOUT MATCHES "UNIX")
SET(default_prefix "/usr")
ELSE()
SET(default_prefix "/usr/local/mysql")
ENDIF()
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX ${default_prefix}
CACHE PATH "install prefix" FORCE)
ENDIF()
SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
CACHE PATH "config directory (for my.cnf)")
MARK_AS_ADVANCED(SYSCONFDIR)
ENDIF()
# STANDALONE layout
SET(INSTALL_BINDIR_STANDALONE "bin")
SET(INSTALL_SBINDIR_STANDALONE "bin")
SET(INSTALL_LIBDIR_STANDALONE "lib")
SET(INSTALL_INCLUDEDIR_STANDALONE "include")
SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin")
SET(INSTALL_DOCDIR_STANDALONE "doc")
SET(INSTALL_MANDIR_STANDALONE "man")
SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share")
SET(INSTALL_SHAREDIR_STANDALONE "share")
SET(INSTALL_SCRIPTDIR_STANDALONE "scripts")
SET(INSTALL_MYSQLTESTDIR_STANDALONE "mysql-test")
SET(INSTALL_SQLBENCHROOTDIR_STANDALONE ".")
SET(INSTALL_DOCREADMEDIR_STANDALONE ".")
SET(INSTALL_SUPPORTFILESDIR_STANDALONE "support-files")
SET(INSTALL_MYSQLDATADIR_STANDALONE "data")
# UNIX layout
SET(INSTALL_BINDIR_UNIX "bin")
SET(INSTALL_SBINDIR_UNIX "sbin")
SET(INSTALL_LIBDIR_UNIX "lib/mysql")
SET(INSTALL_PLUGINDIR_UNIX "lib/mysql/plugin")
SET(INSTALL_DOCDIR_UNIX "share/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
SET(INSTALL_MANDIR_UNIX "share/mysql/man")
SET(INSTALL_INCLUDEDIR_UNIX "include/mysql")
SET(INSTALL_MYSQLSHAREDIR_UNIX "share/mysql")
SET(INSTALL_SHAREDIR_UNIX "share")
SET(INSTALL_SCRIPTDIR_UNIX "bin")
SET(INSTALL_MYSQLTESTDIR_UNIX "mysql-test")
SET(INSTALL_SQLBENCHROOTDIR_UNIX "")
SET(INSTALL_DOCREADMEDIR_UNIX "share/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
SET(INSTALL_SUPPORTFILESDIR_UNIX "")
SET(INSTALL_MYSQLDATADIR_UNIX "var")
# Clear cached variables if install layout was changed
IF(OLD_INSTALL_LAYOUT)
IF(NOT OLD_INSTALL_LAYOUT STREQUAL INSTALL_LAYOUR)
SET(FORCE FORCE)
ENDIF()
ENDIF()
SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "")
# Set INSTALL_FOODIR variables for chosen layout
# (for example, INSTALL_BINDIR will be defined as
# ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE layout is chosen)
FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN
MYSQLTEST SQLBENCHROOT DOCREADME SUPPORTFILES MYSQLDATA)
SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
CACHE STRING "${var} installation directory" ${FORCE})
MARK_AS_ADVANCED(INSTALL_${var}DIR)
ENDFOREACH()
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/cmake_parse_arguments.cmake)
MACRO (INSTALL_DEBUG_SYMBOLS targets)
IF(MSVC)
FOREACH(target ${targets})
GET_TARGET_PROPERTY(location ${target} LOCATION)
GET_TARGET_PROPERTY(type ${target} TYPE)
IF(NOT INSTALL_LOCATION)
IF(type MATCHES "STATIC_LIBRARY" OR type MATCHES "MODULE_LIBRARY" OR type MATCHES "SHARED_LIBRARY")
SET(INSTALL_LOCATION "lib")
ELSEIF(type MATCHES "EXECUTABLE")
SET(INSTALL_LOCATION "bin")
ELSE()
MESSAGE(FATAL_ERROR "cannot determine type of ${target}. Don't now where to install")
ENDIF()
ENDIF()
STRING(REPLACE ".exe" ".pdb" pdb_location ${location})
STRING(REPLACE ".dll" ".pdb" pdb_location ${pdb_location})
STRING(REPLACE ".lib" ".pdb" pdb_location ${pdb_location})
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
ENDIF()
INSTALL(FILES ${pdb_location} DESTINATION ${INSTALL_LOCATION})
ENDFOREACH()
ENDIF()
ENDMACRO()
# Install symbolic link to CMake target.
# the link is created in the same directory as target
# and extension will be the same as for target file.
MACRO(INSTALL_SYMLINK linkbasename target destination)
IF(UNIX)
GET_TARGET_PROPERTY(location ${target} LOCATION)
GET_FILENAME_COMPONENT(path ${location} PATH)
GET_FILENAME_COMPONENT(name_we ${location} NAME_WE)
GET_FILENAME_COMPONENT(ext ${location} EXT)
SET(output ${path}/${linkbasename}${ext})
ADD_CUSTOM_COMMAND(
OUTPUT ${output}
COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output}
COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink
${name_we}${ext}
${linkbasename}${ext}
WORKING_DIRECTORY ${path}
DEPENDS ${target}
)
ADD_CUSTOM_TARGET(symlink_${linkbasename}${ext}
ALL
DEPENDS ${output})
SET_TARGET_PROPERTIES(symlink_${linkbasename}${ext} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
IF(CMAKE_GENERATOR MATCHES "Xcode")
# For Xcode, replace project config with install config
STRING(REPLACE "${CMAKE_CFG_INTDIR}"
"\${CMAKE_INSTALL_CONFIG_NAME}" output ${output})
ENDIF()
INSTALL(FILES ${output} DESTINATION ${destination})
ENDIF()
ENDMACRO()
IF(WIN32)
OPTION(SIGNCODE "Sign executables and dlls with digital certificate" OFF)
MARK_AS_ADVANCED(SIGNCODE)
IF(SIGNCODE)
SET(SIGNTOOL_PARAMETERS
/a /t http://timestamp.verisign.com/scripts/timstamp.dll
CACHE STRING "parameters for signtool (list)")
FIND_PROGRAM(SIGNTOOL_EXECUTABLE signtool)
IF(NOT SIGNTOOL_EXECUTABLE)
MESSAGE(FATAL_ERROR
"signtool is not found. Signing executables not possible")
ENDIF()
IF(NOT DEFINED SIGNCODE_ENABLED)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/testsign.c "int main(){return 0;}")
MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/testsign)
TRY_COMPILE(RESULT ${CMAKE_CURRENT_BINARY_DIR}/testsign ${CMAKE_CURRENT_BINARY_DIR}/testsign.c
COPY_FILE ${CMAKE_CURRENT_BINARY_DIR}/testsign.exe
)
EXECUTE_PROCESS(COMMAND
${SIGNTOOL_EXECUTABLE} sign ${SIGNTOOL_PARAMETERS} ${CMAKE_CURRENT_BINARY_DIR}/testsign.exe
RESULT_VARIABLE ERR ERROR_QUIET OUTPUT_QUIET
)
IF(ERR EQUAL 0)
SET(SIGNCODE_ENABLED 1 CACHE INTERNAL "Can sign executables")
ELSE()
MESSAGE(STATUS "Disable authenticode signing for executables")
SET(SIGNCODE_ENABLED 0 CACHE INTERNAL "Invalid or missing certificate")
ENDIF()
ENDIF()
MARK_AS_ADVANCED(SIGNTOOL_EXECUTABLE SIGNTOOL_PARAMETERS)
ENDIF()
ENDIF()
MACRO(SIGN_TARGET target)
GET_TARGET_PROPERTY(target_type ${target} TYPE)
IF(target_type AND NOT target_type MATCHES "STATIC")
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
target_location ${target_location})
ENDIF()
INSTALL(CODE
"EXECUTE_PROCESS(COMMAND
${SIGNTOOL_EXECUTABLE} sign ${SIGNTOOL_PARAMETERS} ${target_location}
RESULT_VARIABLE ERR)
IF(NOT \${ERR} EQUAL 0)
MESSAGE(FATAL_ERROR \"Error signing ${target_location}\")
ENDIF()
")
ENDIF()
ENDMACRO()
# Installs targets, also installs pdbs on Windows.
#
# More stuff can be added later, e.g signing
# or pre-link custom targets (one example is creating
# version resource for windows executables)
FUNCTION(MYSQL_INSTALL_TARGETS)
CMAKE_PARSE_ARGUMENTS(ARG
"DESTINATION"
""
${ARGN}
)
SET(TARGETS ${ARG_DEFAULT_ARGS})
IF(NOT TARGETS)
MESSAGE(FATAL_ERROR "Need target list for MYSQL_INSTALL_TARGETS")
ENDIF()
IF(NOT ARG_DESTINATION)
MESSAGE(FATAL_ERROR "Need DESTINATION parameter for MYSQL_INSTALL_TARGETS")
ENDIF()
# If signing is required, sign executables before installing
FOREACH(target ${TARGETS})
IF(SIGNCODE AND SIGNCODE_ENABLED)
SIGN_TARGET(${target})
ENDIF()
ADD_VERSION_INFO(${target})
ENDFOREACH()
INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION})
SET(INSTALL_LOCATION ${ARG_DESTINATION} )
INSTALL_DEBUG_SYMBOLS("${TARGETS}")
SET(INSTALL_LOCATION)
ENDFUNCTION()
# Optionally install mysqld/client/embedded from debug build run. outside of the current build dir
# (unless multi-config generator is used like Visual Studio or Xcode).
# For Makefile generators we default Debug build directory to ${buildroot}/../debug.
GET_FILENAME_COMPONENT(BINARY_PARENTDIR ${CMAKE_BINARY_DIR} PATH)
SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug build")
FUNCTION(INSTALL_DEBUG_TARGET target)
CMAKE_PARSE_ARGUMENTS(ARG
"DESTINATION;RENAME"
""
${ARGN}
)
GET_TARGET_PROPERTY(target_type ${target} TYPE)
IF(ARG_RENAME)
SET(RENAME_PARAM RENAME ${ARG_RENAME}${CMAKE_${target_type}_SUFFIX})
ELSE()
SET(RENAME_PARAM)
ENDIF()
IF(NOT ARG_DESTINATION)
MESSAGE(FATAL_ERROR "Need DESTINATION parameter for INSTALL_DEBUG_TARGET")
ENDIF()
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
IF(CMAKE_GENERATOR MATCHES "Makefiles")
STRING(REPLACE "${CMAKE_BINARY_DIR}" "${DEBUGBUILDDIR}" debug_target_location "${target_location}")
ELSE()
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug" debug_target_location "${target_location}" )
ENDIF()
INSTALL(FILES ${debug_target_location}
DESTINATION ${ARG_DESTINATION}
${RENAME_PARAM}
CONFIGURATIONS Release RelWithDebInfo
OPTIONAL)
IF(MSVC)
GET_FILENAME_COMPONENT(ext ${debug_target_location} EXT)
STRING(REPLACE "${ext}" ".pdb" debug_pdb_target_location "${debug_target_location}" )
IF(RENAME_PARAM)
STRING(REPLACE "${ext}" ".pdb" "${ARG_RENAME}" pdb_rename)
SET(PDB_RENAME_PARAM RENAME ${pdb_rename})
ENDIF()
INSTALL(FILES ${debug_pdb_target_location}
DESTINATION ${ARG_DESTINATION}
${RPDB_RENAME_PARAM}
CONFIGURATIONS Release RelWithDebInfo
OPTIONAL)
ENDIF()
ENDFUNCTION()
This diff is collapsed.
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# Make source distribution
# If bzr is present, run bzr export, add output of BUILD/autorun.sh
# if autotools are present, also pack bison output into it.
# Otherwise, just run cpack with source configuration.
SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@")
SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "@CPACK_SOURCE_PACKAGE_FILE_NAME@")
SET(GLIBTOOLIZE_EXECUTABLE "@GLIBTOOLIZE_EXECUTABLE@")
SET(LIBTOOLIZE_EXECUTABLE "@LIBTOOLIZE_EXECUTABLE@")
SET(ACLOCAL_EXECUTABLE "@ACLOCAL_EXECUTABLE@")
SET(AUTOCONF_EXECUTABLE "@AUTOCONF_EXECUTABLE@")
SET(AUTOHEADER_EXECUTABLE "@AUTOHEADER_EXECUTABLE@")
SET(AUTOMAKE_EXECUTABLE "@AUTOMAKE_EXECUTABLE@")
SET(CMAKE_CPACK_COMMAND "@CMAKE_CPACK_COMMAND@")
SET(CMAKE_COMMAND "@CMAKE_COMMAND@")
SET(BZR_EXECUTABLE "@BZR_EXECUTABLE@")
SET(GTAR_EXECUTABLE "@GTAR_EXECUTABLE@")
SET(TAR_EXECUTABLE "@TAR_EXECUTABLE@")
SET(CMAKE_GENERATOR "@CMAKE_GENERATOR@")
SET(CMAKE_MAKE_PROGRAM "@CMAKE_MAKE_PROGRAM@")
SET(CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@")
SET(MYSQL_DOCS_LOCATION "@MYSQL_DOCS_LOCATION@")
SET(PACKAGE_DIR ${CMAKE_BINARY_DIR}/${CPACK_SOURCE_PACKAGE_FILE_NAME})
FILE(REMOVE_RECURSE ${PACKAGE_DIR})
FILE(REMOVE ${PACKAGE_DIR}.tar.gz )
IF(BZR_EXECUTABLE)
MESSAGE(STATUS "Running bzr export")
EXECUTE_PROCESS(
COMMAND "${BZR_EXECUTABLE}" export
${PACKAGE_DIR}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE RESULT
)
IF(NOT RESULT EQUAL 0)
SET(BZR_EXECUTABLE)
ENDIF()
ENDIF()
IF(NOT BZR_EXECUTABLE)
MESSAGE(STATUS "bzr not found or source dir is not a repo, use CPack")
IF(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
# In-source build is the worst option, we have to cleanup source tree.
# Save bison output first.
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
${CMAKE_BINARY_DIR}/sql_yacc.cc COPY_ONLY)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.h
${CMAKE_BINARY_DIR}/sql_yacc.h COPY_ONLY)
IF(CMAKE_GENERATOR MATCHES "Makefiles")
# make clean
EXECUTE_PROCESS(
COMMAND ${CMAKE_MAKE_PROGRAM} clean
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
ENDIF()
# Restore bison output
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql_yacc.cc
${CMAKE_BINARY_DIR}/sql/sql_yacc.cc COPY_ONLY)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql_yacc.h
${CMAKE_BINARY_DIR}/sql/sql_yacc.h COPY_ONLY)
FILE(REMOVE ${CMAKE_BINARY_DIR}/sql_yacc.cc)
FILE(REMOVE ${CMAKE_BINARY_DIR}/sql_yacc.h)
ENDIF()
EXECUTE_PROCESS(
COMMAND ${CMAKE_CPACK_COMMAND} -G TGZ --config ./CPackSourceConfig.cmake
${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E tar xzf
${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz
${PACK_SOURCE_PACKAGE_FILE_NAME}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
ENDIF()
# Try to pack output of BUILD/autorun, if autotools are present
IF(GLIBTOOLIZE_EXECUTABLE OR LIBTOOLIZE_EXECUTABLE)
IF(ACLOCAL_EXECUTABLE AND AUTOMAKE_EXECUTABLE AND AUTOCONF_EXECUTABLE
AND AUTOHEADER_EXECUTABLE)
SET(HAVE_AUTOTOOLS 1)
ENDIF()
ENDIF()
IF(HAVE_AUTOTOOLS)
EXECUTE_PROCESS(COMMAND BUILD/autorun.sh
WORKING_DIRECTORY ${PACKAGE_DIR})
ELSE()
MESSAGE( "Autotools not found, resulting source package can only be built"
" with cmake")
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/configure.pl
${PACKAGE_DIR}/configure
COPYONLY)
IF(UNIX)
EXECUTE_PROCESS(COMMAND chmod +x ${PACKAGE_DIR}/configure)
ENDIF()
ENDIF()
# Copy bison output
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.h
${PACKAGE_DIR}/sql/sql_yacc.h COPYONLY)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
${PACKAGE_DIR}/sql/sql_yacc.cc COPYONLY)
# Add documentation, if user has specified where to find them
IF(MYSQL_DOCS_LOCATION)
MESSAGE("Copying documentation files from " ${MYSQL_DOCS_LOCATION})
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_directory "${MYSQL_DOCS_LOCATION}" "${PACKAGE_DIR}")
ENDIF()
# In case we used CPack, it could have copied some
# extra files that are not usable on different machines.
FILE(REMOVE ${PACKAGE_DIR}/CMakeCache.txt)
FILE(REMOVE_RECURSE ${PACKAGE_DIR}/autom4te.cache)
# When packing source, prefer gnu tar to "cmake -P tar"
# cmake does not preserve timestamps.gnuwin32 tar is broken, cygwin is ok
IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
IF (EXISTS C:/cygwin/bin/tar.exe)
SET(TAR_EXECUTABLE C:/cygwin/bin/tar.exe)
ENDIF()
ENDIF()
IF(GTAR_EXECUTABLE)
SET(GNUTAR ${GTAR_EXECUTABLE})
ELSEIF(TAR_EXECUTABLE)
EXECUTE_PROCESS(
COMMAND "${TAR_EXECUTABLE}" --version
RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR
)
IF(RESULT EQUAL 0 AND OUT MATCHES "GNU")
SET(GNUTAR ${TAR_EXECUTABLE})
ENDIF()
ENDIF()
SET($ENV{GZIP} "--best")
IF(GNUTAR)
SET(PACK_COMMAND
${GNUTAR} cfz
${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz
${CPACK_SOURCE_PACKAGE_FILE_NAME}
)
ELSE()
SET(PACK_COMMAND ${CMAKE_COMMAND} -E tar cfz
${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz
${CPACK_SOURCE_PACKAGE_FILE_NAME}
)
ENDIF()
MESSAGE(STATUS "Creating source package")
EXECUTE_PROCESS(
COMMAND ${PACK_COMMAND}
)
MESSAGE(STATUS "Source package ${PACKAGE_DIR}.tar.gz created")
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# This script merges many static libraries into
# one big library on Unix.
SET(TARGET_LOCATION "@TARGET_LOCATION@")
SET(TARGET "@TARGET@")
SET(STATIC_LIBS "@STATIC_LIBS@")
SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@")
SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(TEMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/merge_archives_${TARGET})
MAKE_DIRECTORY(${TEMP_DIR})
# Extract each archive to its own subdirectory(avoid object filename clashes)
FOREACH(LIB ${STATIC_LIBS})
GET_FILENAME_COMPONENT(NAME_NO_EXT ${LIB} NAME_WE)
SET(TEMP_SUBDIR ${TEMP_DIR}/${NAME_NO_EXT})
MAKE_DIRECTORY(${TEMP_SUBDIR})
EXECUTE_PROCESS(
COMMAND ${CMAKE_AR} -x ${LIB}
WORKING_DIRECTORY ${TEMP_SUBDIR}
)
FILE(GLOB_RECURSE LIB_OBJECTS "${TEMP_SUBDIR}/*")
SET(OBJECTS ${OBJECTS} ${LIB_OBJECTS})
ENDFOREACH()
# Use relative paths, makes command line shorter.
GET_FILENAME_COMPONENT(ABS_TEMP_DIR ${TEMP_DIR} ABSOLUTE)
FOREACH(OBJ ${OBJECTS})
FILE(RELATIVE_PATH OBJ ${ABS_TEMP_DIR} ${OBJ})
FILE(TO_NATIVE_PATH ${OBJ} OBJ)
SET(ALL_OBJECTS ${ALL_OBJECTS} ${OBJ})
ENDFOREACH()
FILE(TO_NATIVE_PATH ${TARGET_LOCATION} ${TARGET_LOCATION})
# Now pack the objects into library with ar.
EXECUTE_PROCESS(
COMMAND ${CMAKE_AR} -r ${TARGET_LOCATION} ${ALL_OBJECTS}
WORKING_DIRECTORY ${TEMP_DIR}
)
EXECUTE_PROCESS(
COMMAND ${CMAKE_RANLIB} ${TARGET_LOCATION}
WORKING_DIRECTORY ${TEMP_DIR}
)
# Cleanup
FILE(REMOVE_RECURSE ${TEMP_DIR})
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# Add executable plus some additional MySQL specific stuff
# Usage (same as for standard CMake's ADD_EXECUTABLE)
#
# MYSQL_ADD_EXECUTABLE(target source1...sourceN)
#
# MySQL specifics:
# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory
# On Windows :
# - add version resource
# - instruct CPack to do autenticode signing if SIGNCODE is set
INCLUDE(cmake_parse_arguments)
FUNCTION (MYSQL_ADD_EXECUTABLE)
# Pass-through arguments for ADD_EXECUTABLE
CMAKE_PARSE_ARGUMENTS(ARG
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION"
""
${ARGN}
)
LIST(GET ARG_DEFAULT_ARGS 0 target)
LIST(REMOVE_AT ARG_DEFAULT_ARGS 0)
SET(sources ${ARG_DEFAULT_ARGS})
ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
# tell CPack where to install
IF(NOT ARG_EXCLUDE_FROM_ALL)
IF(NOT ARG_DESTINATION)
SET(ARG_DESTINATION ${INSTALL_BINDIR})
ENDIF()
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION})
ENDIF()
ENDFUNCTION()
\ No newline at end of file
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# Read value for a variable from configure.in
MACRO(MYSQL_GET_CONFIG_VALUE keyword var)
IF(NOT ${var})
IF (EXISTS ${CMAKE_SOURCE_DIR}/configure.in)
FILE (STRINGS ${CMAKE_SOURCE_DIR}/configure.in str REGEX "^[ ]*${keyword}=")
IF(str)
STRING(REPLACE "${keyword}=" "" str ${str})
STRING(REGEX REPLACE "[ ].*" "" str ${str})
SET(${var} ${str} CACHE INTERNAL "Config variable")
ENDIF()
ENDIF()
ENDIF()
ENDMACRO()
# Read mysql version for configure script
MACRO(GET_MYSQL_VERSION)
IF(NOT VERSION_STRING)
IF(EXISTS ${CMAKE_SOURCE_DIR}/configure.in)
FILE(STRINGS ${CMAKE_SOURCE_DIR}/configure.in str REGEX "AM_INIT_AUTOMAKE")
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[-][^ \\)]+" VERSION_STRING "${str}")
IF(NOT VERSION_STRING)
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" VERSION_STRING "${str}")
IF(NOT VERSION_STRING)
FILE(STRINGS configure.in str REGEX "AC_INIT\\(")
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[-][a-zAZ0-9]+" VERSION_STRING "${str}")
ENDIF()
ENDIF()
ENDIF()
ENDIF()
IF(NOT VERSION_STRING)
MESSAGE(FATAL_ERROR
"VERSION_STRING cannot be parsed, please specify -DVERSION_STRING=major.minor.patch-extra"
"when calling cmake")
ENDIF()
SET(VERSION ${VERSION_STRING})
# Remove trailing (non-numeric) part of the version string
STRING(REGEX REPLACE "[^\\.0-9].*" "" VERSION_STRING ${VERSION_STRING})
STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" MAJOR_VERSION "${VERSION_STRING}")
STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" MINOR_VERSION "${VERSION_STRING}")
STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" PATCH "${VERSION_STRING}")
SET(MYSQL_BASE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" CACHE INTERNAL "MySQL Base version")
SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH}")
MATH(EXPR MYSQL_VERSION_ID "10000*${MAJOR_VERSION} + 100*${MINOR_VERSION} + ${PATCH}")
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})
ENDMACRO()
# Get mysql version and other interesting variables
GET_MYSQL_VERSION()
MYSQL_GET_CONFIG_VALUE("PROTOCOL_VERSION" PROTOCOL_VERSION)
MYSQL_GET_CONFIG_VALUE("DOT_FRM_VERSION" DOT_FRM_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_TCP_PORT_DEFAULT" MYSQL_TCP_PORT_DEFAULT)
MYSQL_GET_CONFIG_VALUE("MYSQL_UNIX_ADDR_DEFAULT" MYSQL_UNIX_ADDR_DEFAULT)
MYSQL_GET_CONFIG_VALUE("SHARED_LIB_MAJOR_VERSION" SHARED_LIB_MAJOR_VERSION)
IF(NOT MYSQL_TCP_PORT_DEFAULT)
SET(MYSQL_TCP_PORT_DEFAULT "3306")
ENDIF()
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()
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}")
ENDIF()
SET(CPACK_PACKAGE_VENDOR "Sun Microsystems, Inc")
SET(CPACK_SOURCE_GENERATOR "TGZ")
SET(CPACK_SOURCE_IGNORE_FILES
\\\\.bzr/
\\\\.bzr-mysql
.bzrignore
CMakeCache.txt
/CMakeFiles/
/version_resources/
/_CPack_Packages/
$.gz
$.zip
)
# Defintions for windows version resources
SET(PRODUCTNAME "MySQL Server")
SET(COMPANYNAME ${CPACK_PACKAGE_VENDOR})
# 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_TARGET_PROPERTY(location gen_versioninfo LOCATION)
IF(NOT location)
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)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_BINARY_DIR}/versioninfo_exe.res
${CMAKE_BINARY_DIR}/versioninfo_dll.res
COMMAND ${CMAKE_RC_COMPILER} versioninfo_exe.rc
COMMAND ${CMAKE_RC_COMPILER} versioninfo_dll.rc
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
ADD_CUSTOM_TARGET(gen_versioninfo
DEPENDS
${CMAKE_BINARY_DIR}/versioninfo_exe.res
${CMAKE_BINARY_DIR}/versioninfo_dll.res
)
ENDIF()
FUNCTION(ADD_VERSION_INFO target)
GET_TARGET_PROPERTY(target_type ${target} TYPE)
ADD_DEPENDENCIES(${target} gen_versioninfo)
IF(target_type MATCHES "SHARED" OR target_type MATCHES "MODULE")
SET_PROPERTY(TARGET ${target} APPEND PROPERTY LINK_FLAGS
"\"${CMAKE_BINARY_DIR}/versioninfo_dll.res\"")
ELSEIF(target_type MATCHES "EXE")
SET_PROPERTY(TARGET ${target} APPEND PROPERTY LINK_FLAGS
"${target_link_flags} \"${CMAKE_BINARY_DIR}/versioninfo_exe.res\"")
ENDIF()
ENDFUNCTION()
ELSE()
FUNCTION(ADD_VERSION_INFO)
ENDFUNCTION()
ENDIF()
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
#Enable 64 bit file offsets
SET(_LARGE_FILES 1)
# Fix xlC oddity - it complains about same inline function defined multiple times
# in different compilation units
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-qstaticinline" HAVE_QSTATICINLINE)
IF(HAVE_QSTATICINLINE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qstaticinline")
ENDIF()
# The following is required to export all symbols
# (also with leading underscore)
STRING(REPLACE "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS
${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}")
STRING(REPLACE "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS
"${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")
\ No newline at end of file
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# Cygwin is not Windows
SET(WIN32 0)
\ No newline at end of file
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# This file includes OSX specific options and quirks, related to system checks
# Workaround for CMake bug#9051
# (CMake does not pass CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET when
# running TRY_COMPILE)
IF(CMAKE_OSX_SYSROOT)
SET(ENV{CMAKE_OSX_SYSROOT} ${CMAKE_OSX_SYSROOT})
ENDIF()
IF(CMAKE_OSX_SYSROOT)
SET(ENV{MACOSX_DEPLOYMENT_TARGET} ${OSX_DEPLOYMENT_TARGET})
ENDIF()
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
# Workaround linker problems on OSX 10.4
IF(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.5")
ADD_DEFINITIONS(-fno-common)
ENDIF()
ENDIF()
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# This file includes FreeBSD specific options and quirks, related to system checks
#Legacy option, maybe not needed anymore , taken as is from autotools build
ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000)
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
INCLUDE(CheckCXXSourceCompiles)
# Enable 64 bit file offsets
SET(_LARGEFILE64_SOURCE 1)
SET(_FILE_OFFSET_BITS 64)
# If Itanium make shared library suffix .so
# OS understands both .sl and .so. CMake would
# use .sl, however MySQL prefers .so
IF(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "9000")
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so" CACHE INTERNAL "" FORCE)
SET(CMAKE_SHARED_MODULE_SUFFIX ".so" CACHE INTERNAL "" FORCE)
ENDIF()
IF(CMAKE_SYSTEM MATCHES "11")
ADD_DEFINITIONS(-DHPUX11)
ENDIF()
IF(CMAKE_CXX_COMPILER_ID MATCHES "HP")
# Enable standard C++ flags if required
# HP seems a bit traditional and "new" features like ANSI for-scope
# still require special flag to be set
CHECK_CXX_SOURCE_COMPILES(
"int main()
{
for(int i=0; i<1; i++);
for(int i=0; i<1; i++);
return 0;
}
" HAVE_ANSI_FOR_SCOPE)
IF(NOT HAVE_ANSI_FOR_SCOPE)
# Enable conformant behavior
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Aa")
ENDIF()
ENDIF()
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# This file includes Linux specific options and quirks, related to system checks
INCLUDE(CheckSymbolExists)
# Something that needs to be set on legacy reasons
SET(TARGET_OS_LINUX 1)
SET(HAVE_NPTL 1)
SET(_GNU_SOURCE 1)
# Fix CMake (< 2.8) flags. -rdynamic exports too many symbols.
FOREACH(LANG C CXX)
STRING(REPLACE "-rdynamic" ""
CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS
${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}
)
ENDFOREACH()
# Ensure we have clean build for shared libraries
# without unresolved symbols
SET(LINK_FLAG_NO_UNDEFINED "--Wl,--no-undefined")
# 64 bit file offset support flag
SET(_FILE_OFFSET_BITS 64)
# Linux specific HUGETLB /large page support
CHECK_SYMBOL_EXISTS(SHM_HUGETLB sys/shm.h HAVE_DECL_SHM_HUGETLB)
IF(HAVE_DECL_SHM_HUGETLB)
SET(HAVE_LARGE_PAGES 1)
SET(HUGETLB_USE_PROC_MEMINFO 1)
SET(HAVE_LARGE_PAGE_OPTION 1)
ENDIF()
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
GET_FILENAME_COMPONENT(_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
INCLUDE(${_SCRIPT_DIR}/AIX.cmake)
\ No newline at end of file
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
INCLUDE(CheckSymbolExists)
INCLUDE(CheckCSourceRuns)
INCLUDE(CheckCSourceCompiles)
SET(TARGET_OS_SOLARIS 1)
# Enable 64 bit file offsets
SET(_FILE_OFFSET_BITS 64)
# Legacy option, without it my_pthread is having problems
ADD_DEFINITIONS(-DHAVE_RWLOCK_T)
# On Solaris, use of intrinsics will screw the lib search logic
# Force using -lm, so rint etc are found.
SET(LIBM m)
# CMake defined -lthread as thread flag. This crashes in dlopen
# when trying to load plugins workaround with -lpthread
SET(CMAKE_THREADS_LIBS_INIT -lpthread CACHE INTERNAL "")
# Solaris specific large page support
CHECK_SYMBOL_EXISTS(MHA_MAPSIZE_VA sys/mman.h HAVE_DECL_MHA_MAPSIZE_VA)
IF(HAVE_DECL_MHA_MAPSIZE_VA)
SET(HAVE_SOLARIS_LARGE_PAGES 1)
SET(HAVE_LARGE_PAGE_OPTION 1)
ENDIF()
# Solaris atomics
CHECK_C_SOURCE_RUNS(
"
#include <atomic.h>
int main()
{
int foo = -10; int bar = 10;
int64_t foo64 = -10; int64_t bar64 = 10;
if (atomic_add_int_nv((uint_t *)&foo, bar) || foo)
return -1;
bar = atomic_swap_uint((uint_t *)&foo, (uint_t)bar);
if (bar || foo != 10)
return -1;
bar = atomic_cas_uint((uint_t *)&bar, (uint_t)foo, 15);
if (bar)
return -1;
if (atomic_add_64_nv((volatile uint64_t *)&foo64, bar64) || foo64)
return -1;
bar64 = atomic_swap_64((volatile uint64_t *)&foo64, (uint64_t)bar64);
if (bar64 || foo64 != 10)
return -1;
bar64 = atomic_cas_64((volatile uint64_t *)&bar64, (uint_t)foo64, 15);
if (bar64)
return -1;
atomic_or_64((volatile uint64_t *)&bar64, 0);
return 0;
}
" HAVE_SOLARIS_ATOMIC)
# Check is special processor flag needs to be set on older GCC
#that defaults to v8 sparc . Code here is taken from my_rdtsc.c
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SIZEOF_VOID_P EQUAL 4
AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
SET(SOURCE
"
int main()
{
long high\;
long low\;
__asm __volatile__ (\"rd %%tick,%1\; srlx %1,32,%0\" : \"=r\" ( high), \"=r\" (low))\;
return 0\;
} ")
CHECK_C_SOURCE_COMPILES(${SOURCE} HAVE_SPARC32_TICK)
IF(NOT HAVE_SPARC32_TICK)
SET(CMAKE_REQUIRED_FLAGS "-mcpu=v9")
CHECK_C_SOURCE_COMPILES(${SOURCE} HAVE_SPARC32_TICK_WITH_V9)
SET(CMAKE_REQUIRED_FLAGS)
IF(HAVE_SPARC32_TICK_WITH_V9)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mcpu=v9")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=v9")
ENDIF()
ENDIF()
ENDIF()
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# This file includes Windows specific hacks, mostly around compiler flags
INCLUDE (CheckCSourceCompiles)
INCLUDE (CheckCXXSourceCompiles)
INCLUDE (CheckStructHasMember)
INCLUDE (CheckLibraryExists)
INCLUDE (CheckFunctionExists)
INCLUDE (CheckCCompilerFlag)
INCLUDE (CheckCSourceRuns)
INCLUDE (CheckSymbolExists)
INCLUDE (CheckTypeSize)
# Optionally read user configuration, generated by configure.js.
# This is left for backward compatibility reasons only.
INCLUDE(${CMAKE_BINARY_DIR}/win/configure.data OPTIONAL)
# avoid running system checks by using pre-cached check results
# system checks are expensive on VS since every tiny program is to be compiled in
# a VC solution.
GET_FILENAME_COMPONENT(_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
INCLUDE(${_SCRIPT_DIR}/WindowsCache.cmake)
# OS display name (version_compile_os etc).
# Used by the test suite to ignore bugs on some platforms,
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
SET(SYSTEM_TYPE "Win64")
ELSE()
SET(SYSTEM_TYPE "Win32")
ENDIF()
# Intel compiler is almost Visual C++
# (same compile flags etc). Set MSVC flag
IF(CMAKE_C_COMPILER MATCHES "icl")
SET(MSVC TRUE)
ENDIF()
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
ADD_DEFINITIONS("-D_WIN32_WINNT=0x0501")
# Speed up build process excluding unused header files
ADD_DEFINITIONS("-DWIN32_LEAN_AND_MEAN")
# Adjust compiler and linker flags
IF(MINGW AND CMAKE_SIZEOF_VOIDP EQUAL 4)
# mininal architecture flags, i486 enables GCC atomics
ADD_DEFINITIONS(-march=i486)
ENDIF()
IF(MSVC)
# Enable debug info also in Release build, and create PDB to be able to analyze
# crashes
FOREACH(lang C CXX)
SET(CMAKE_${lang}_FLAGS_RELEASE "${CMAKE_${lang}_FLAGS_RELEASE} /Zi")
ENDFOREACH()
FOREACH(type EXE SHARED MODULE)
SET(CMAKE_{type}_LINKER_FLAGS_RELEASE "${CMAKE_${type}_LINKER_FLAGS_RELEASE} /debug")
ENDFOREACH()
# Force static runtime libraries
FOREACH(flag
CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
ENDFOREACH()
# Remove support for exceptions
FOREACH(flag CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_INIT)
STRING(REPLACE "/EHsc" "" "${flag}" "${${flag}}")
ENDFOREACH()
# Fix CMake's predefined huge stack size
FOREACH(type EXE SHARED MODULE)
STRING(REGEX REPLACE "/STACK:([^ ]+)" "" CMAKE_${type}_LINKER_FLAGS "${CMAKE_${type}_LINKER_FLAGS}")
STRING(REGEX REPLACE "/INCREMENTAL:([^ ]+)" "" CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO}")
ENDFOREACH()
ADD_DEFINITIONS(-DPTHREAD_STACK_MIN=1048576)
# Mark 32 bit executables large address aware so they can
# use > 2GB address space
IF(CMAKE_SIZEOF_VOID_P MATCHES 4)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
ENDIF()
# Speed up multiprocessor build
IF (MSVC_VERSION GREATER 1400)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
ENDIF()
#TODO: update the code and remove the disabled warnings
ADD_DEFINITIONS(/wd4800 /wd4805)
IF (MSVC_VERSION GREATER 1310)
ADD_DEFINITIONS(/wd4996)
ENDIF()
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
# _WIN64 is defined by the compiler itself.
# Yet, we define it here again to work around a bug with Intellisense
# described here: http://tinyurl.com/2cb428.
# Syntax highlighting is important for proper debugger functionality.
ADD_DEFINITIONS("-D_WIN64")
ENDIF()
ENDIF()
# Always link with socket library
LINK_LIBRARIES(ws2_32)
# ..also for tests
SET(CMAKE_REQUIRED_LIBRARIES ws2_32)
# System checks
SET(SIGNAL_WITH_VIO_CLOSE 1) # Something that runtime team needs
# IPv6 constants appeared in Vista SDK first. We need to define them in any case if they are
# not in headers, to handle dual mode sockets correctly.
CHECK_SYMBOL_EXISTS(IPPROTO_IPV6 "winsock2.h" HAVE_IPPROTO_IPV6)
IF(NOT HAVE_IPPROTO_IPV6)
SET(HAVE_IPPROTO_IPV6 41)
ENDIF()
CHECK_SYMBOL_EXISTS(IPV6_V6ONLY "winsock2.h;ws2ipdef.h" HAVE_IPV6_V6ONLY)
IF(NOT HAVE_IPV6_V6ONLY)
SET(IPV6_V6ONLY 27)
ENDIF()
# Some standard functions exist there under different
# names (e.g popen is _popen or strok_r is _strtok_s)
# If a replacement function exists, HAVE_FUNCTION is
# defined to 1. CMake variable <function_name> will also
# be defined to the replacement name.
# So for example, CHECK_FUNCTION_REPLACEMENT(popen _popen)
# will define HAVE_POPEN to 1 and set variable named popen
# to _popen. If the header template, one needs to have
# cmakedefine popen @popen@ which will expand to
# define popen _popen after CONFIGURE_FILE
MACRO(CHECK_FUNCTION_REPLACEMENT function replacement)
STRING(TOUPPER ${function} function_upper)
CHECK_FUNCTION_EXISTS(${function} HAVE_${function_upper})
IF(NOT HAVE_${function_upper})
CHECK_FUNCTION_EXISTS(${replacement} HAVE_${replacement})
IF(HAVE_${replacement})
SET(HAVE_${function_upper} 1 )
SET(${function} ${replacement})
ENDIF()
ENDIF()
ENDMACRO()
MACRO(CHECK_SYMBOL_REPLACEMENT symbol replacement header)
STRING(TOUPPER ${symbol} symbol_upper)
CHECK_SYMBOL_EXISTS(${symbol} ${header} HAVE_${symbol_upper})
IF(NOT HAVE_${symbol_upper})
CHECK_SYMBOL_EXISTS(${replacement} ${header} HAVE_${replacement})
IF(HAVE_${replacement})
SET(HAVE_${symbol_upper} 1)
SET(${symbol} ${replacement})
ENDIF()
ENDIF()
ENDMACRO()
CHECK_SYMBOL_REPLACEMENT(S_IROTH _S_IREAD sys/stat.h)
CHECK_SYMBOL_REPLACEMENT(S_IFIFO _S_IFIFO sys/stat.h)
CHECK_SYMBOL_REPLACEMENT(SIGQUIT SIGTERM signal.h)
CHECK_SYMBOL_REPLACEMENT(SIGPIPE SIGINT signal.h)
CHECK_SYMBOL_REPLACEMENT(isnan _isnan float.h)
CHECK_SYMBOL_REPLACEMENT(finite _finite float.h)
CHECK_FUNCTION_REPLACEMENT(popen _popen)
CHECK_FUNCTION_REPLACEMENT(pclose _pclose)
CHECK_FUNCTION_REPLACEMENT(access _access)
CHECK_FUNCTION_REPLACEMENT(strcasecmp _stricmp)
CHECK_FUNCTION_REPLACEMENT(strncasecmp _strnicmp)
CHECK_FUNCTION_REPLACEMENT(snprintf _snprintf)
CHECK_FUNCTION_REPLACEMENT(strtok_r strtok_s)
CHECK_FUNCTION_REPLACEMENT(strtoll _strtoi64)
CHECK_FUNCTION_REPLACEMENT(strtoull _strtoui64)
CHECK_FUNCTION_REPLACEMENT(vsnprintf _vsnprintf)
CHECK_TYPE_SIZE(ssize_t SIZE_OF_SSIZE_T)
IF(NOT HAVE_SIZE_OF_SSIZE_T)
SET(ssize_t SSIZE_T)
ENDIF()
SET(FN_NO_CASE_SENSE 1)
\ No newline at end of file
This diff is collapsed.
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
# Produce meaningful package name for the binary package
# The logic is rather involved with special cases for different OSes
MACRO(GET_PACKAGE_FILE_NAME Var)
IF(NOT VERSION)
MESSAGE(FATAL_ERROR
"Variable VERSION needs to be set prior to calling GET_PACKAGE_FILE_NAME")
ENDIF()
IF(NOT SYSTEM_NAME_AND_PROCESSOR)
SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 1)
SET(DEFAULT_PLATFORM ${CMAKE_SYSTEM_NAME})
SET(DEFAULT_MACHINE ${CMAKE_SYSTEM_PROCESSOR})
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(64BIT 1)
ENDIF()
IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 0)
SET(DEFAULT_PLATFORM "win")
IF(64BIT)
SET(DEFAULT_MACHINE "x64")
ELSE()
SET(DEFAULT_MACHINE "32")
ENDIF()
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
IF(NOT 64BIT AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
SET(DEFAULT_MACHINE "i686")
ENDIF()
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
# SunOS 5.10=> solaris10
STRING(REPLACE "5." "" VER "${CMAKE_SYSTEM_VERSION}")
SET(DEFAULT_PLATFORM "solaris${VER}")
IF(64BIT)
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
SET(DEFAULT_MACHINE "x86_64")
ELSE()
SET(DEFAULT_MACHINE "${CMAKE_SYSTEM_PROCESSOR}-64bit")
ENDIF()
ENDIF()
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
STRING(REPLACE "B." "" VER "${CMAKE_SYSTEM_VERSION}")
SET(DEFAULT_PLATFORM "hpux${VER}")
IF(64BIT)
SET(DEFAULT_MACHINE "${CMAKE_SYSTEM_PROCESSOR}-64bit")
ENDIF()
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "AIX")
SET(DEFAULT_PLATFORM "${CMAKE_SYSTEM_NAME}5.${CMAKE_SYSTEM_VERSION}")
IF(64BIT)
SET(DEFAULT_MACHINE "${CMAKE_SYSTEM_PROCESSOR}-64bit")
ENDIF()
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
STRING(REGEX MATCH "[0-9]+\\.[0-9]+" VER "${CMAKE_SYSTEM_VERSION}")
SET(DEFAULT_PLATFORM "${CMAKE_SYSTEM_NAME}${VER}")
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64")
SET(DEFAULT_MACHINE "x86_64")
IF(NOT 64BIT)
SET(DEFAULT_MACHINE "i386")
ENDIF()
ENDIF()
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
SET(DEFAULT_PLATFORM "osx${CMAKE_OSX_DEPLOYMENT_TARGET}")
ELSE()
SET(VER "${CMAKE_SYSTEM_VERSION}")
STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" VER "${VER}")
# Subtract 4 from Darwin version to get correct osx10.X
MATH(EXPR VER "${VER} -4")
SET(DEFAULT_PLATFORM "osx10.${VER}")
ENDIF()
LIST(LENGTH CMAKE_OSX_ARCHITECTURES LEN)
IF(LEN GREATER 1)
SET(DEFAULT_MACHINE "universal")
ELSE()
SET(DEFAULT_MACHINE "${CMAKE_OSX_ARCHITECTURES}")
ENDIF()
IF(DEFAULT_MACHINE MATCHES "i386")
SET(DEFAULT_MACHINE "x86")
ENDIF()
ENDIF()
IF(NOT PLATFORM)
SET(PLATFORM ${DEFAULT_PLATFORM})
ENDIF()
IF(NOT MACHINE)
SET(MACHINE ${DEFAULT_MACHINE})
ENDIF()
IF(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE)
SET(SYSTEM_NAME_AND_PROCESSOR "${PLATFORM}-${MACHINE}")
ELSE()
SET(SYSTEM_NAME_AND_PROCESSOR "${PLATFORM}${MACHINE}")
ENDIF()
ENDIF()
IF(SHORT_PRODUCT_TAG)
SET(PRODUCT_TAG "-${SHORT_PRODUCT_TAG}")
ELSEIF(MYSQL_SERVER_SUFFIX)
SET(PRODUCT_TAG "${MYSQL_SERVER_SUFFIX}") # Already has a leading dash
ELSE()
SET(PRODUCT_TAG)
ENDIF()
SET(package_name "mysql${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}")
# Sometimes package suffix is added (something like "-icc-glibc23")
IF(PACKAGE_SUFFIX)
SET(package_name "${package_name}${PACKAGE_SUFFIX}")
ENDIF()
STRING(TOLOWER ${package_name} package_name)
SET(${Var} ${package_name})
ENDMACRO()
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -23,7 +23,7 @@ noinst_HEADERS = chared.h el.h el_term.h histedit.h key.h parse.h refresh.h sig.
sys.h config.h hist.h map.h prompt.h read.h \
search.h tty.h filecomplete.h np/vis.h
EXTRA_DIST = makelist.sh
EXTRA_DIST = makelist.sh CMakeLists.txt
CLEANFILES = makelist common.h emacs.h vi.h fcns.h help.h fcns.c help.c
......
This diff is collapsed.
......@@ -29,7 +29,7 @@ noinst_HEADERS = readline.h chardefs.h keymaps.h \
tilde.h rlconf.h rltty.h ansi_stdlib.h \
tcap.h rlstdc.h
EXTRA_DIST= emacs_keymap.c vi_keymap.c
EXTRA_DIST= emacs_keymap.c vi_keymap.c CMakeLists.txt
DEFS = -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
perl mysql-test-run.pl --force --timer --comment=debug --skip-ndbcluster --skip-rpl --report-features --experimental=collections/default.experimental
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment