summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-05-13 04:15:35 -0700
committerAndreas Kling <kling@serenityos.org>2021-05-13 18:52:48 +0200
commit8693c925a0695b7db1358875fb2f7d4ec421316d (patch)
tree7fb616ecbe014fec5f86800bc40836d952870db0
parentd922bb09038d818f9a484061ff71b251b5b8194f (diff)
downloadserenity-8693c925a0695b7db1358875fb2f7d4ec421316d.zip
CMake: Fix message levels for error conditions during configuration
Make messages which should be fatal, actually fail the build. - FATAL is not a valid mode keyword. The full list is available in the docs: https://cmake.org/cmake/help/v3.19/command/message.html - SEND_ERROR doesn't immediately stop processing, FATAL_ERROR does. We should immediately stop if the Toolchain is not present. - The app icon size validation was just a WARNING that is easy to overlook. We should promote it to a FATAL_ERROR so that people will not overlook the issue when adding a new application. We can only make the small icon message FATAL_ERROR, as there is currently one violation of the medium app icon validation.
-rw-r--r--CMakeLists.txt2
-rw-r--r--Kernel/CMakeLists.txt2
-rw-r--r--Meta/CMake/utils.cmake2
3 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8f2790620..994b19a784 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16)
project(SerenityOS C CXX ASM)
if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "")
- message(FATAL
+ message(FATAL_ERROR
": 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.")
diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt
index 3e699f4ea3..5bb5e189b7 100644
--- a/Kernel/CMakeLists.txt
+++ b/Kernel/CMakeLists.txt
@@ -353,7 +353,7 @@ if (${CMAKE_HOST_SYSTEM_NAME} MATCHES SerenityOS)
include_directories(/usr/local/include/c++/${GCC_VERSION}/)
else()
if (NOT EXISTS ${TOOLCHAIN_ROOT}/Kernel/${SERENITY_ARCH}-pc-serenity/include/c++/${GCC_VERSION}/)
- message(SEND_ERROR "Toolchain version ${GCC_VERSION} appears to be missing! Please run: Meta/serenity.sh rebuild-toolchain")
+ message(FATAL_ERROR "Toolchain version ${GCC_VERSION} appears to be missing! Please run: Meta/serenity.sh rebuild-toolchain")
endif()
include_directories(${TOOLCHAIN_ROOT}/Kernel/${SERENITY_ARCH}-pc-serenity/include/c++/${GCC_VERSION}/)
include_directories(${TOOLCHAIN_ROOT}/Kernel/${SERENITY_ARCH}-pc-serenity/include/c++/${GCC_VERSION}/${SERENITY_ARCH}-pc-serenity/)
diff --git a/Meta/CMake/utils.cmake b/Meta/CMake/utils.cmake
index a57cee686c..1c52d1306d 100644
--- a/Meta/CMake/utils.cmake
+++ b/Meta/CMake/utils.cmake
@@ -98,7 +98,7 @@ function(serenity_app target_name)
if (EXISTS "${small_icon}")
embed_resource("${target_name}" serenity_icon_s "${small_icon}")
else()
- message(WARNING "Missing small app icon: ${small_icon}")
+ message(FATAL_ERROR "Missing small app icon: ${small_icon}")
endif()
if (EXISTS "${medium_icon}")