From 2cae5128fdc6316a7f0913cb89ec467b33b9715b Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Sun, 7 Feb 2016 20:20:02 +0100 Subject: Apple: Enable -isystem for GNU Compiler >= 4 (#15953) Due to #4662 -isystem support was disabled for all GNU Compilers on Apple platforms. But the change was probably a just work around for a broken compiler on Tiger (see 10837#c27206). So we tighten the condition to only kick in for GCC versions earlier than 4. That should ensure sane behavior for Xcode 3.2 and later. --- Modules/Compiler/GNU.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index 764fbf9..d1ca85e 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -52,7 +52,7 @@ macro(__compiler_gnu lang) set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " -S -o ") - if(NOT APPLE) + if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462 set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") endif() endmacro() -- cgit v0.12