Skip to content

Commit

Permalink
CMake: Verify the GCC host version is new enough to build serenity
Browse files Browse the repository at this point in the history
There are lots of people who have issues building serenity because
they don't read the build directions closely enough and have an
unsupported GCC version as their host compiler. Instead of repeatedly
having to answer these kinds of questions, lets just error out upfront.
  • Loading branch information
bgianfo authored and alimpfard committed May 31, 2021
1 parent 0af192f commit dc54a0f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "")
"and that's all there is.")
endif()

if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.2)
message(FATAL_ERROR
"A GCC version less than 10.2 was detected (${CMAKE_CXX_COMPILER_VERSION}), this is unsupported.\n"
"Please re-read the build instructions documentation, and upgrade your host compiler.\n")
endif()

set(CMAKE_INSTALL_MESSAGE NEVER)

enable_testing()
Expand Down

0 comments on commit dc54a0f

Please sign in to comment.