Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-07-27 18:29:13 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-07-27 18:29:13 +0300
commita5b2aa96e4a72b9270462a59d6317a0659e8c6e2 (patch)
tree646d3355e91e0ff9d6240eb17d5da3206e190d63 /build_files
parentd64e171c4ba1648c647e5b160cc80c5dd15d05c6 (diff)
CMake: reject older GCC version when using precompiled Linux libraries
In the situation where the precompiled libraries are used on Linux + GCC, a version of GCC older than 9.3 is guaranteed to cause problems. This just implents a fatal error message when we know it doesn't make sense to continue. We could do more checks and add some warnings, but it's very likely that these will be ignored amongst the other noise. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D8396
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/platform/platform_unix.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index 96244b65f21..c5e8893424b 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -36,6 +36,11 @@ if(NOT DEFINED LIBDIR)
elseif(EXISTS ${LIBDIR_CENTOS7_ABI})
set(LIBDIR ${LIBDIR_CENTOS7_ABI})
set(WITH_CXX11_ABI OFF)
+
+ if(CMAKE_COMPILER_IS_GNUCC AND
+ CMAKE_C_COMPILER_VERSION VERSION_LESS 9.3)
+ message(FATAL_ERROR "GCC version must be at least 9.3 for precompiled libraries, found ${CMAKE_C_COMPILER_VERSION}")
+ endif()
endif()
# Avoid namespace pollustion.