Bug #79550 ADD SUPPORT FOR -DCMAKE_BUILD_TYPE=RELEASE
Submitted: 7 Dec 2015 21:17 Modified: 25 Oct 2018 9:40
Reporter: Mark Callaghan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.6.24, 5.6.28 OS:Linux
Assigned to: CPU Architecture:Any

[7 Dec 2015 21:17] Mark Callaghan
Description:
Is MySQL going to return to warning free code? I cannot build  with cmake -DMYSQL_MAINTAINER_MODE=1 because of these.

https://gist.github.com/mdcallag/4dc80d9a73742d926088
https://gist.github.com/mdcallag/58338f93999ac83d3c64

How to repeat:
Using 64-bit Ubuntu desktop while compiling 5.6.24

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"

$ g++ --version
g++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4

Suggested fix:
fix the warnings
[8 Dec 2015 2:06] Mark Callaghan
-DCMAKE_BUILD_TYPE=Release does not use -fno-strict-aliasing while -DCMAKE_BUILD_TYPE=RelWithDebInfo does use it which explains why I saw the warnings but others might now.
[8 Dec 2015 8:09] Jon Olav Hauglid
Hi Mark,

We only support and test "RelWithDebInfo" and "Debug". Documented here:
http://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html#option_cmake_cmak...

Do you still get any errors with either two of these?

Should we consider this bug report a feature request to add support for "Release"?
[10 Dec 2015 17:15] Mark Callaghan
Yes, consider this a request to support Release or remove support for it.
[25 Oct 2018 9:40] Erlend Dahl
Fixed in 8.0.13.

The CMAKE_BUILD_TYPE CMake option now supports a Release build type,
which is like the RelWithDebInfo build type but omits debugging
information to reduce the build size.