Commit graph

158 commits

Author SHA1 Message Date
chuck.bell@oracle.com
44b2df4aba BUG#12549572 : CMake file does not include gcov option
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"
2011-05-12 18:22:14 -04:00
Joerg Bruehe
fd21e07d6b Fix bug#42969 Please add a MANIFEST to each build
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.
2011-02-11 15:55:25 +01:00
Davi Arnaut
995ce0bb0a Bug#58871: Reorganize maintainer mode compiler flags to allow
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.
2010-12-15 08:30:09 -02:00
Alexander Nozdrin
7a3636c1af Merge from mysql-5.1-bugteam. 2010-11-24 13:23:44 +03:00
Georgi Kodinov
589428b625 Bug #50021: Windows standard configuration files are showing Linux
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
2010-11-18 18:02:37 +02:00
Vladislav Vaintroub
be93a81172 Bug#58272: -DBUILD_CONFIG=mysql_release is broken with cmake 2.8.3
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.
2010-11-17 22:06:24 +01:00
Vladislav Vaintroub
a6b4be2522 add missing COMPONENT to all CMake INSTALL commands 2010-11-13 23:16:52 +01:00
Vladislav Vaintroub
8a9549434d Bug#58178: "make package" is broken with cmake 2.8.3
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)
2010-11-13 19:38:39 +01:00
Guilhem Bichot
6bf5b4b98c Merge of the fix for BUG#57933 "add -Wdeclaration-after-statement to gcc builds"
from 5.1; extended here to Cmake builds.
2010-11-05 14:33:59 +01:00
Vladislav Vaintroub
8069325f59 merge 2010-10-21 14:12:23 +02:00
Davi Arnaut
f741170485 Merge of mysql-5.1-bugteam into mysql-5.5-bugteam. 2010-10-18 15:38:32 -02:00
Vladislav Vaintroub
a52ea672a0 Bug#55647:CMake build rebuilds some libraries twice for embedded
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.
2010-10-06 15:15:27 +02:00
Davi Arnaut
2044c80745 Merge of mysql-5.1-bugteam into mysql-5.5-merge. 2010-09-24 10:03:17 -03:00
Alexander Nozdrin
13ec2a1625 Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect).
Fixing copyright text.
2010-08-12 19:19:57 +04:00
Davi Arnaut
8978c1cde2 Remove error injection option, it's not being used. 2010-08-09 10:23:55 -03:00
Davi Arnaut
c562aece2e Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Post-merge fix: remove --with-debug=full, it was only used for safemalloc.
2010-08-06 09:59:38 -03:00
Vladislav Vaintroub
ff1ee26107 Build cleanups
- 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.
2010-08-05 18:38:24 +02:00
Vasil Dimov
8152cd0ac8 Merge mysql-trunk-bugfixing -> mysql-trunk-innodb
(resolving conflicts in mysql-test/suite/rpl/t/rpl_sync-slave.opt and
configure.cmake)
2010-07-21 17:22:29 +03:00
Alexander Nozdrin
9503a8e23f Manual merge from mysql-trunk.
Conflicts:
  - scripts/CMakeLists.txt
2010-07-19 18:00:29 +04:00
Davi Arnaut
649390ac81 Merge of mysql-trunk-bugfixing into mysql-trunk-merge. 2010-07-15 10:47:50 -03:00
Davi Arnaut
985017674f Add the cmake option MYSQL_MAINTAINER_MODE which is equivalent
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.
2010-07-12 13:39:00 -03:00
Davi Arnaut
a10ae35328 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
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.
2010-07-08 18:20:08 -03:00
Davi Arnaut
245645e225 Unset the execute bit where it's not needed. 2010-07-03 20:17:03 -03:00
Kent Boortz
24b3962d51 CMakeLists.txt
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"
2010-06-23 12:56:22 +02:00
Vladislav Vaintroub
23d05c1c6e Bug#53593: Add some instrumentation to improve Valgrind sensitivity.
Implement WITH_VALGRIND for the CMake build.
2010-06-21 13:39:30 +02:00
Daniel Fischer
9891642e77 merge 2010-06-18 17:04:15 +02:00
Daniel Fischer
89205a3bf6 post-merge fix 1 2010-05-28 16:50:23 +02:00
Jon Olav Hauglid
1c02ed3e67 manual merge from mysql-trunk-bugfixing 2010-05-18 14:52:51 +02:00
Konstantin Osipov
d63caa0c30 Committing on behalf of Valdislav Vaintroub (reviewed and
approved):

3161 Vladislav Vaintroub       2010-04-29                 
 Bug#53196 : CMake builds don't support 'make tags' and 
'make ctags' targets.  
   - Added tags and ctags targets
2010-05-14 18:42:10 +04:00
Jonathan Perkin
5b85121ca6 Changes to build using CMake according to existing release packages:
- Update/fix file layouts for each package type, add new types for
   native package formats including deb, rpm and svr4.

 - Build all plugins, including debug versions

 - Update compiler flags to match current release

 - Add missing @VAR@ expansions

 - Install correct mysqclient library symlinks

 - Fix icc/ia64 builds

 - Fix install of libmysqld-debug

 - Don't include mysql_embedded

 - Remove unpackaged manual pages to avoid missing files warnings

 - Don't install mtr's test suite
2010-05-12 12:51:23 +01:00
Daniel Fischer
d60efe5820 Changes to MSI installer:
- Introduce MANUFACTURER setting to set package manufacturer via CMake.
- Introduce COMMUNITY_BUILD setting to be passed on to packaging
  (not used here, but required for our own packages to determine what
   added files should be included in the package).
- Create an RTF version of the COPYING text file and use that as the
  default license (can be overridden by providing a COPYING.rtf file).
- Allow passing extra arguments to candle and light via environment.
  (Need -sval in pushbuild, but want validation elsewhere.)
- Introduce a custom action that stops and uninstalls the service 
  if the user installed one that points into the MySQL directory
  that is being removed.
  (Our own packages historically used the instance configuration wizard
  for this, but it wouldn't be very nice if MSIs created by our users
  couldn't remove it too.)
- Make install location configurable again ("Browse" button in custom
  installation was greyed out before).
- Remove registry keys that use "MySQL AB"; they should only be set in 
  packages provided by us. Users can set their own registry keys if
  they want to.
2010-04-30 13:30:32 +02:00
Daniel Fischer
50edf454b1 Merge 2010-04-21 14:58:09 +02:00
Jonathan Perkin
f037ad4fbf Try to fix datadir 2010-04-01 13:35:16 +02:00
Jonathan Perkin
48f61d94f7 Expand INSTALL_INFODIR correctly.
Make mysql.info optional.
2010-03-25 15:04:39 +01:00
Jonathan Perkin
127bdb6eda Don't install documentation when INSTALL_LAYOUT=RPM, as the spec file
prefers to take docs directly from the source tree.
2010-03-25 13:16:13 +01:00
Jonathan Perkin
5fd878c3f0 Add INSTALL_INFODIR and use it to install mysql.info into the
correct location.
2010-03-25 11:43:11 +01:00
Vladislav Vaintroub
e1384dc718 Fix WITH_DEBUG problems in CMake build, so people who use configure wrappers do not
suffer. The problem was that when custom C flags were defined with in environment 
variable CFLAGS, WITH_DEBUG did not have any effect. Also, switch from 
WITH_DEBUG=ON to WITH_DEBUG=OFF   was not handled correctly .Expected is switch 
to with RelwithDebInfo or when custom compiler flags  are defined, to None.
2010-03-02 01:53:15 +01:00
Jonathan Perkin
26e77e0027 Some CMake packaging fixes:
- Remove INSTALL-BINARY from installed docs directory, we provide a copy
   in the root directory (but perhaps this should be revisited later).

 - Disable audit_null and daemon_example plugins.

 - Fix the docs directory.

 - Remove mysql-test/Makefile.in

 - Build and install mysql_tzinfo_to_sql

 - Remove share/charsets/languages.html
2010-02-24 19:19:24 +00:00
Jonathan Perkin
b0a89a2ee5 Support non-GPL builds. 2010-02-23 09:53:48 +00:00
Vladislav Vaintroub
541cf19c5c When installing, exclude some documents in Docs 2010-02-19 17:51:53 +01:00
Vladislav Vaintroub
7e01172ce3 Fix a couple fo things replated to MSI 2010-02-16 16:06:57 +01:00
Vladislav Vaintroub
890c52d889 Add components to INSTALL, some eraly Wix support 2010-02-10 20:23:24 +01:00
vvaintroub
051f769dc5 Move WITH_UNITTESTS option up - otherwise it skips plugin unittests 2010-01-28 14:33:44 +01:00
Vladislav Vaintroub
19a2c052a5 WL#5161: Implement Mats' suggestion of moving OS specific CMake code to OS specific files, instead of
polluting code with IF(CMAKE_SYSTEM_NAME MATCHES...), first on Windows.
2010-01-26 13:47:34 +01:00
Vladislav Vaintroub
03fcdd0194 Following autotools tradition, add preprocessor definitions specified in environment variable CPPFLAGS 2010-01-24 21:03:21 +01:00
Vladislav Vaintroub
c827968a2d Handle different installation layouts.
using  cmake option INSTALL_LAYOUT=STANDALONE would produce the layout as in 
tar.gz or zip packages.
INSTALL_LAYOUT=UNIX will produce unixish install layout  (with mysqld being in sbin subdirectory , libs in lib/mysql etc). This layout is used for RPM packages.

Subtle differences in both packages unfortunately lead to the need to recompile MySQL to use with other package type - as otherwise for example default plugins or data directories would be wrong set.

There are numerous other variables that  allow fine-tuning packaging layout. (INSTALL_BINDIR, INSTALL_LIBDIR , INSTALL_PLUGINDIR etc).

This options are different from autotools as they do not expect full paths to directories, but only subdirectory of CMAKE_INSTALL_PREFIX.

There are 2 special options that expect full directory paths
- MYSQL_DATADIR that defines default MYSQL data directory (autotools equivalent
is --localstatedir)
- SYSCONFDIR  can be added to search my.cnf search path (autotools equivalent is --sysconfdir)
2010-01-24 16:23:16 +01:00
Vladislav Vaintroub
50d844d24a restore lost -g when WITH_DEBUG was specified 2010-01-21 12:37:22 +00:00
Vladislav Vaintroub
df2d0359d8 - another take on BUILD_CONFIG variable - use OPTION instead of SET for
boolean variables to ensure option is in cache. Also use documented CMAKE_USE_MAKE_RULES_OVERRIDE feature instead of INCLUDE.

- remove superfluous tests in innobase's CMakeLists.txt
2010-01-20 00:52:21 +01:00
Vladislav Vaintroub
7d1d78e574 Fix end-of-line characters in mysql_release.cmake to be unix-conform
make -DBUILD_CONFIG=mysql_release work
2010-01-19 02:21:48 +00:00
Vladislav Vaintroub
7e7965aeb4 Add WITH_FAST_MUTEXES option (non-debug configurations only) 2010-01-13 13:33:32 +01:00