diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2016-02-07 19:20:02 (GMT) |
---|---|---|
committer | Gregor Jasny <gjasny@googlemail.com> | 2016-02-07 19:20:02 (GMT) |
commit | 2cae5128fdc6316a7f0913cb89ec467b33b9715b (patch) | |
tree | d7ab0ee252b101e499d1fa9e721eea9a362e9d80 /Modules/Compiler | |
parent | c8100794b4faab4255c1229f966f57525c18ccc7 (diff) | |
download | CMake-2cae5128fdc6316a7f0913cb89ec467b33b9715b.zip CMake-2cae5128fdc6316a7f0913cb89ec467b33b9715b.tar.gz CMake-2cae5128fdc6316a7f0913cb89ec467b33b9715b.tar.bz2 |
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.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
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 "<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() |