Skip to content

Commit 8090c1f

Browse files
committed
Require GCC 4.6 or newer
1 parent d84d080 commit 8090c1f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cmake/cmake/Requirements.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION VERSION_LESS 1920)
2525
"Visual Studio version ${MSVC_VERSION} is no longer supported. Please, "
2626
"upgrade the Microsoft Visual Studio to 2019 version 16 (1920) or newer."
2727
)
28+
elseif(
29+
CMAKE_C_COMPILER_ID STREQUAL "GNU"
30+
AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6
31+
)
32+
# PHP also has a minimum gcc version required in an undocumented way.
33+
# See: https://github.com/php/php-src/pull/15397
34+
message(
35+
FATAL_ERROR
36+
"GNU C compiler version ${CMAKE_C_COMPILER_VERSION} is not supported. "
37+
"Please upgrade GNU C compiler to at least 4.6 or newer."
38+
)
2839
endif()
2940

3041
################################################################################

0 commit comments

Comments
 (0)