summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-02-09 15:10:18 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-02-09 15:10:18 (GMT)
commit778fda1e925098ebd4377eaabce932f47bb40ec2 (patch)
treea15c56ed158b73bc0124bb5819ffa1c484e456f7
parent3b8c0fbfd787fc21137b0e2f511e7c91b3e70227 (diff)
parent5b04aa31b8d791bc5e162fbc8c89b2d0058c8572 (diff)
downloadCMake-778fda1e925098ebd4377eaabce932f47bb40ec2.zip
CMake-778fda1e925098ebd4377eaabce932f47bb40ec2.tar.gz
CMake-778fda1e925098ebd4377eaabce932f47bb40ec2.tar.bz2
Merge topic 'apple-isystem-gcc'
5b04aa31 Xcode: Disable test for system include dirs 2cae5128 Apple: Enable -isystem for GNU Compiler >= 4 (#15953)
-rw-r--r--Modules/Compiler/GNU.cmake2
-rw-r--r--Tests/Complex/Executable/CMakeLists.txt3
-rw-r--r--Tests/ComplexOneConfig/Executable/CMakeLists.txt3
3 files changed, 5 insertions, 3 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()
diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt
index a1f8e68..c30dcbc 100644
--- a/Tests/Complex/Executable/CMakeLists.txt
+++ b/Tests/Complex/Executable/CMakeLists.txt
@@ -146,7 +146,8 @@ add_dependencies(notInAllCustom notInAllExe)
#
add_subdirectory(Temp)
-if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX
+ AND NOT XCODE) # XCODE is excluded due to #15687
add_executable(testSystemDir testSystemDir.cxx)
set_target_properties(testSystemDir PROPERTIES COMPILE_FLAGS "-Werror")
endif()
diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
index b2307b2..4897b48 100644
--- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
@@ -146,7 +146,8 @@ add_dependencies(notInAllCustom notInAllExe)
#
add_subdirectory(Temp)
-if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX
+ AND NOT XCODE) # XCODE is excluded due to #15687
add_executable(testSystemDir testSystemDir.cxx)
set_target_properties(testSystemDir PROPERTIES COMPILE_FLAGS "-Werror")
endif()