Bug #70647 -DWITH_DEBUG=1 has more effects than -DCMAKE_BUILD_TYPE=Debug

Submitted: 17 Oct 2013 12:12 Modified: 3 Apr 2014 15:17
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any
Tags: build, cmake, debug

[17 Oct 2013 12:12] Laurynas Biveinis
Description:
The docs for -DCMAKE_BUILD_TYPE=Debug at https://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html#option_cmake_cma... state that 

"That is, -DWITH_DEBUG=1 has the same effect as -DCMAKE_BUILD_TYPE=Debug. "

which leaves some room for interpretation, but is IMHO confusing in any case, as -DWITH_DEBUG=1 enables a superset of -DCMAKE_BUILD_TYPE=Debug features. At least the safe mutexes are enabled if the former option is specified and not enabled if the latter one is specified.

This is either a doc bug if the mismatch between the two is intended, or a CMake bug if it's not.

This already has been reported as bug 58231, but that one was closed as duplicate of bug 58279, which addressed UNIV_DEBUG only.

How to repeat:
Build with these two options separately and safe mutexes will be present in one build but missing in another.

Suggested fix:
Clarify docs or make options identical.
[21 Oct 2013 9:57] MySQL Verification Team
Hello Laurynas,

Thank you for the bug report.

Thanks,
Umesh
[13 Feb 2014 18:21] Paul DuBois
Noted in 5.7.4 changelog.

Configuring with -DWITH_DEBUG=1 did not have the same effect as
configuring with -DCMAKE_BUILD_TYPE=Debug.
[3 Apr 2014 15:17] Laurynas Biveinis
5.7$ bzr log -r 7460
------------------------------------------------------------
revno: 7460
committer: Tor Didriksen <tor.didriksen@oracle.com>
branch nick: trunk-cmake
timestamp: Wed 2014-02-12 09:39:51 +0100
message:
  Bug#17632854 -DWITH_DEBUG=1 HAS MORE EFFECTS THAN -DCMAKE_BUILD_TYPE=DEBUG
  
  -DWITH_DEBUG=1 should have the same effect as -DCMAKE_BUILD_TYPE=Debug

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.