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.
This commit is contained in:
Gregor Jasny 2016-02-07 20:20:02 +01:00
parent c8100794b4
commit 2cae5128fd
1 changed files with 1 additions and 1 deletions

View File

@ -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()