diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-04-27 00:30:33 -0700 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-04-27 13:07:04 +0200 |
commit | b970dbf2afae63e4bfd33656cd6c2f038a561382 (patch) | |
tree | 0521c5ab0e3e15fb7ebbb2d5d98dc2c1bfb15b7b /Kernel/CMakeLists.txt | |
parent | 2ef93a3c0712c4e4d2dbb84ae8fa65b29b2b905b (diff) | |
download | serenity-b970dbf2afae63e4bfd33656cd6c2f038a561382.zip |
Build: Provide the user with a nice message after Toolchain upgrade
Lots of people are confused by the error message you get when the
Toolchain is behind/messed up:
'initializer-list: No such file or directory'
Before this error can happen, catch the problem at CMake configure time,
and provide them with an actionable error message.
Diffstat (limited to 'Kernel/CMakeLists.txt')
-rw-r--r-- | Kernel/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt index 2445bf1111..79e2ced26a 100644 --- a/Kernel/CMakeLists.txt +++ b/Kernel/CMakeLists.txt @@ -351,6 +351,9 @@ file(GENERATE OUTPUT linker.ld INPUT linker.ld) 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") + 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/) link_directories(${TOOLCHAIN_ROOT}/Kernel/${SERENITY_ARCH}-pc-serenity/lib) |