Merge topic 'apple-isystem-gcc'

5b04aa31 Xcode: Disable test for system include dirs
2cae5128 Apple: Enable -isystem for GNU Compiler >= 4 (#15953)
This commit is contained in:
Brad King 2016-02-09 10:10:18 -05:00 committed by CMake Topic Stage
commit 778fda1e92
3 changed files with 5 additions and 3 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()

View File

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

View File

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