Merge topic 'apple-isystem-gcc'
5b04aa31
Xcode: Disable test for system include dirs2cae5128
Apple: Enable -isystem for GNU Compiler >= 4 (#15953)
This commit is contained in:
commit
778fda1e92
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue