From 49c4d0a27c3de089a8f50695cddc73532d622f95 Mon Sep 17 00:00:00 2001 From: Thanatomanic <6567747+Thanatomanic@users.noreply.github.com> Date: Fri, 5 Jun 2020 08:41:26 +0200 Subject: [PATCH] Temporarily prevents #5749 from causing issues for the unknown user when compiling dev Code taken from https://bitbucket.org/agriggio/art/commits/d65d285968a0cc799a6daec3c3b8b81dba03a4cb --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c6530734..b7cf35099 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION "Building RawTherapee requires using GCC version 4.9 or higher!") endif() +# Warning for GCC 10, which causes problems #5749: +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "10.0") + message(STATUS "WARNING: gcc ${CMAKE_CXX_COMPILER_VERSION} is known to miscompile RawTherapee when using -ftree-loop-vectorize, forcing the option to be off") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-tree-loop-vectorize") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-tree-loop-vectorize") +endif() + # We might want to build using the old C++ ABI, even when using a new GCC # version: if(USE_OLD_CXX_ABI)