Bug#17894997 CMAKE WARNING WRT INTERFACE_LINK_LIBRARIES
Bug#17905155 CMAKE WARNING WHEN GENERATING MAKEFILE
Bug#71089 CMake warning when generating Makefile
Use old policy for LINK_INTERFACE_LIBRARIES.
Bug#68338 RFE: make tmpdir a build-time configurable option
Post-push fix: 'cmake -LH | grep TMP' showed TMPDIR as a BOOL option,
which was a bit confusing: show it as a PATH instead.
Bug#68338 RFE: make tmpdir a build-time configurable option
Background: Some distributions use tmpfs for mounting /tmp by
default, which has some advantages, but brings also new
issues. Fedora started using tmpfs on /tmp in version 18 for
example. If not configured otherwise in my.cnf, MySQL uses
system's constant P_tmpdir expanded to /tmp on Linux. This can
introduce some problems with limited space in /tmp and also some
data loss in case of replication slave [1].
In case distributions would like to use /var/tmp, which should be
better for MySQL purposes, then we have to patch the source or
change tmpdir option in my.cnf, which is however not updated in
case it has already existed.
Thus, it would be useful to be able to specify default tmpdir
path using a configure option, while using P_tmpdir in case it is
not defined explicitly.
Based on a contribution from Honza Horak
Ignore --with-client-ldflags
it's not supported by the cmake scripts anyways.
Ignore --with-mysqld-ldflags
it's only used with --with-mysqld-ldflags=-static
and that doesn't work.
from the MySQL 5.5 source tree.
Contrary to the comment, the spec file for these ULN RPMs
was missing in the previous changeset (blame ".bzrignore").
This change now brings said spec file, and it adds cmake
handling for the new files.
Still for internal tool tests only, not yet ready for publishing.
CMakeLists.txt:
Add the subdirectory holding specific stuff
for the RedHat-compatible RPMs for ULN.
cmake/install_layout.cmake:
Explicitly mention my the ULN RPMs are handled.
This patch inserts an 'ENABLE_GCOV' option for enabling gcov compilation
on Linux machines. It modifies the CMakeLists.txt setting this option
to 'OFF' by default.
Note: The option requires a debug build. For example,
-DCMAKE_BUILD_TYPE:string="Debug"
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".
"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.
"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.
The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.
CMakeLists.txt:
For the new files describing the source and the build
("INFO_SRC" and "INFO_BIN"), we need a new file
"cmake/info_macros.cmake.in" with the build rules.
1) This file must be configured with the current variables.
2) "INFO_SRC" can be created during the cmake phase,
but this should be repeated with each "make" to
protect against a developer doing only "make" after
a "bzr pull" (or "bzr commit").
So have it both as a cmake rule and as a custom target.
3) "INFO_BIN" must be created during the make phase
only, because it contains information from files
which will be written at the end of the cmake phase only.
Therefore, it must be a custom target which is included
in all "make" targets.
4) The resulting "INFO_*" files must be included in packages.
cmake/info_bin.cmake:
This is the file to create "INFO_BIN",
by calling the "CREATE_INFO_BIN()" macro.
It must be a separate file, so that the macro
definitions can be included in other cmake scripts
without that file inclusion causing a side effect,
the macro call.
That call would modify the source tree which should
be trated read-only.
cmake/info_macros.cmake.in:
This new file contains the macros to create the
"INFO_*" files during various steps of the build,
the calls will be at other places.
1) For source: If running from a BZR tree, always create
(update) "INFO_SRC" by running "bzr version-info".
Outside a BZR tree, try to take it from exported
sources, and create it only if missing, in that
case put the three level version number into it.
2) "INFO_BIN" contains
- date/time and host name of the build host,
- information about the platform,
- information about the C and CXX compiler
and the options given to them (Unix only),
- the feature flags as reported by "cmake -L".
cmake/info_src.cmake:
This is the file to create "INFO_SRC",
by calling the "CREATE_INFO_SRC()" macro.
It must be a separate file, so that the macro
definitions can be included in other cmake scripts
without that file inclusion causing a side effect,
the macro call.
That call would modify the source tree which should
be trated read-only.
cmake/make_dist.cmake.in:
Create a "VERSION_src" file during "make dist".
In case it already exists from a preceding "cmake" run
or tree export (which is quite likely), a new
"make dist" must not modify it.
mysql-test/r/file_contents.result:
Result of test for bug#42969.
mysql-test/t/file_contents.test:
Perl test scriptlet for bug#42969.
support-files/mysql.spec.sh:
Add "INFO_SRC" and "INFO_BIN" to the RPM contents.
option for specific compilers
Reorganize the maintainer mode cmake code to allow options
for specific compilers. For now, enable -Wcheck for ICC,
but do not turn warnings into errors.
CMakeLists.txt:
Move the code that sets options to cmake/maintainer.cmake
cmake/maintainer.cmake:
Add macros for each specific compiler.
options/settings
1. Changed the default value for socket on Windows to the windows
default
2. Removed hard-coded trailing slashes from innodb_data_home_dir
and innodb_log_group_name_dir.
3. Added extra backslashes to the innodb directory example
4. Made the tempdir platform "dependent"
5. Fixed the comments in the .ini files
6. Removed the tmpdir from the templates and the scripts
The reason for the bug is that :
- we use system checks in cmake/os/mysql_release.cmake
- we include cmake/os/mysql_release.cmake using CMAKE_USER_MAKE_RULES_OVERRIDE
- this (having system checks based on TRY_COMPILE inside file pointed by
CMAKE_USER_MAKE_RULES_OVERRIDE does not work with cmake 2.8.3,
and according to Kitware was never meant to work, it just happened to work by accident
until 2.8.2 release (though, it seems not to work wiith 2.6.0 either)
Related CMake bug discussing the situation:
http://public.kitware.com/Bug/view.php?id=11469
The fix is to use INCLUDE instead of CMAKE_USER_MAKE_RULES_OVERRIDE as suggested
by Kitware. The downside is that compile flags are not in cache, but this is pure cosmetics.
The functionality is the same, flags are used for compiling are correct using INCLUDE.
Problem: with "make package" , many small packages are
generated, one per CMake COMPONENT, instead of expected single
package. This is due to the new (in cmake 2.8.3) component-based
install for archive( e.g ZIP,TGZ ) CPack generators.
See http://public.kitware.com/Bug/view.php?id=11452 for discussion.
Fix: use CPACK_MONOLITHIC_INSTALL=1 to enforce single package.
Reset this variable temporarily to 0 for MSI creation (MSI needs
COMPONENTs)
CMakeLists.txt:
Enable the maintainer mode if debug support is enabled.
Does not cause it to be enabled if the user explicitly
disabled the maintainer mode.
A simple version of the patch : add WITH_PIC to debug compilation.
Engines that are not dependent on internal stuff (like THD structure)
will not be recompiled for embedded in debug mode.
Examples of such engines are : archive, federated, innodb. Engines
with dependencies on internals (myisam,heap,myisammrg) will still be
fully recompiled.
Post-merge fix: remove --with-debug=full, it was only used for safemalloc.
BUILD/compile-pentium-mysqlfs-debug:
Remove build script for a feature that is long gone.
- Simplify sql-bench installation,
do not try to resolve names : this leads to probem
if builddir is symlink located on different filesystem.
(reported by alik)
- Make WITHOUT_XXX (disabling plugin) work for DEFAULT
plugins. Prior to the patch is behaved just like
MANDATORY.
- LINK_LIBRARIES in MYSQL_ADD_PLUGIN had no effect for
statically linked plugins.
- Fix constant rebuild of initdb target on Windows.
to the autotools option mysql-maintainer-mode. This option is
intended to set a few flags that should be activated by anyone
doing MySQL development, regardless of the build type. Also, the
flags are only set by the very end of the platform checks as
to not disturb fragile checks.
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.
Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.
Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost.
The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.
Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
client/mysqldump.c:
Pass my_free directly as its signature is compatible with the
callback type -- which wasn't the case for free_table_ent.
cmake/build_configurations/mysql_release.cmake
- Corrected spelling ENABLE_LOCAL_INFILE => ENABLED_LOCAL_INFILE
- In addition to "RelWithDebInfo", set target "Release" and "Debug"
- Set Debug flags
- Enabled SSL on Mac OS X
- For gcc builds, set RELEASE and DEBUG flags as well
- For g++ builds, added "-fno-implicit-templates"
- Use "-O" (gcc -O1) for optimized binaries, as "DEBUG" in out case
is more about enabling trace support to the server, no optimization
makes binaries too slow to be practical to reproduce problems
cmake/os/WindowsCache.cmake
- Removed unused HAVE_SYS_IOCTL
config.h.cmake
- Added header checks and missing defines
- Removed unused HAVE_SYS_IOCTL
- Grouped and uncommented some HAVE_* that are really not
defines, but internal variables used in the CMake setup,
- Added hard coded flags for HP-UX and Mac OS X
configure.cmake
- Added header checks and missing defines
- Removed unused HAVE_SYS_IOCTL
- "sys/dir.h" test needs "sys/types.h"
- Corrected syntax for "sys/ptem.h" test
- Don't exclude test for some types if Mac OS X, harmless
to do the test and we want the HAVE_<type> settings
- Added hard coded flags for HP-UX and Mac OS X
extra/yassl/CMakeLists.txt
extra/yassl/taocrypt/CMakeLists.txt
- Added missing source file "template_instnt.cpp"