mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 05:05:32 +03: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
Notes:
sideshowbarker
2024-07-19 05:48:44 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/e162b59a5ef Pull-request: https://github.com/SerenityOS/serenity/pull/2514
@ -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…
Reference in New Issue
Block a user