summaryrefslogtreecommitdiff
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2016-02-07 20:20:02 +0100
committerGregor Jasny <gjasny@googlemail.com>2016-02-07 20:20:02 +0100
commit2cae5128fdc6316a7f0913cb89ec467b33b9715b (patch)
treed7ab0ee252b101e499d1fa9e721eea9a362e9d80 /Modules/Compiler
parentc8100794b4faab4255c1229f966f57525c18ccc7 (diff)
downloadcmake-2cae5128fdc6316a7f0913cb89ec467b33b9715b.tar.gz
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.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/GNU.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index 764fbf990f..d1ca85e3dd 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 "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
- 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()