[MDEV-22989] Make cmake error out when unsupported option is passed as CMAKE_BUILD_TYPE Created: 2020-06-23 Updated: 2023-11-28 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Compiling |
| Fix Version/s: | 10.11 |
| Type: | Task | Priority: | Major |
| Reporter: | Robert Bindar | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
A mistake that seems to be quite common, which I currently experienced whilst investigating a `DBUG_SYNC` test failure reported by monty, is that it is actually possible to pass ` -DCMAKE_BUILD_TYPE=mysql_release` to cmake, even though `mysql_release` is a `BUILD_CONFIG` not a `BUILD_TYPE`. We should make cmake fail if an unsupported option is passed as `BUILD_TYPE`. |
| Comments |
| Comment by Vladislav Vaintroub [ 2020-06-23 ] |
|
The other option, is to fix #define puzzle, e.g DBUG_SYNC would really only be in effect depending on DBUG_OFF. I think ideally we should be building fine, with no extra preprocessor definitions passed to the compiler. Surprisingly this will also build DBUG on We could still warn ( at cmake phase that the configuration is not known , but dying might not be the best idea. |