mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
cmake: Make setting CMAKE_BUILD_TYPE an error.
I tried setting it to Release, then noticed that it didn't build due to gcc's optimizer-level dependent warnings and -Werror, then started fixing the warnings for a bit (all false positives), then looked at the global CMakeLists.txt and realized that the default build is aleady using compiler optimizations. It looks like people aren't supposed to change this, so make that explicit to be friendly to people familiar with cmake but new to serenity.
This commit is contained in:
parent
9de92ae4c1
commit
e162b59a5e
1 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,13 @@
|
|||
cmake_minimum_required(VERSION 3.16)
|
||||
project(SerenityOS C CXX ASM)
|
||||
|
||||
if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||
message(FATAL
|
||||
": Don't use CMAKE_BUILD_TYPE when building serenity.\n"
|
||||
"The default build type is optimized with debug info and asserts enabled,\n"
|
||||
"and that's all there is.")
|
||||
endif()
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_custom_target(image
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue