Bug #113560 Build option CMAKE_BUILD_TYPE not fully documented.
Submitted: 4 Jan 2024 18:46 Modified: 10 Jan 2024 20:38
Reporter: Jean-François Gagné Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.2, 8.0, 5.7 OS:Any
Assigned to: CPU Architecture:Any

[4 Jan 2024 18:46] Jean-François Gagné
Description:
Hi,

In the 8.2.0 doc [1], the different documented values of CMAKE_BUILD_TYPE are:
- RelWithDebInfo
- Release
- Debug

[1]: https://dev.mysql.com/doc/refman/8.2/en/source-configuration-options.html#option_cmake_cma...

But when running "cmake .. -LH", I also get None and MinSizeRel which are missing from the doc.  I would expect these two to also be documented.

Note that the same applies to the 8.0 docs [2].

[2]: https://dev.mysql.com/doc/refman/8.0/en/source-configuration-options.html#option_cmake_cma...

Note that the 5.7 doc [3] is also missing these 2, and is missing Release, but I guess this will not get fixed because EOL.

[3]: https://dev.mysql.com/doc/refman/5.7/en/source-configuration-options.html#option_cmake_cma...

Many thanks for looking into this,

Jean-François Gagné

How to repeat:
# When running below...
git clone https://github.com/mysql/mysql-server.git
mkdir mysql-server/build
cd mysql-server/build

# ...and than below...
cmake .. -LH 2>&1 | grep -e "^CMAKE_BUILD_TYPE" -B 2

# ...I get below, showing the None and MinSizeRel options,
#   which are not referenced in the doc.
// Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
 CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo

Suggested fix:
Document the None and MinSizeRel options of CMAKE_BUILD_TYPE in the 8.2 and 8.0 doc.

Ideally, also document Release in the 5.7 docs.
[5 Jan 2024 5:17] MySQL Verification Team
Hello Jean-François,

Thank you for the report and feedback.

regards,
Umesh
[5 Jan 2024 20:55] Terje Røsten
Hi,

thanks for your report.

this is a standard cmake feature (a side effect of using cmake as build system):

 https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html

Options None and MinSizeRel are not supported by MySQL Team should be
documented as unsupported if mentioned at all imho.
[8 Jan 2024 15:45] Jean-François Gagné
Thanks Terje for you comment, and mentioning None and MinSizeRel are not supported.

I think mentioning these in the doc would still be useful, especially that I was under the impression that the minimal binaries were generated with MinSizeRel (indicating this is not the case and that this option is not supported is useful information).

Cheers, J-F
[10 Jan 2024 20:38] Philip Olson
Posted by developer:
 
Thanks for reporting this Jean-François, the documentation source was updated accordingly.