Skip to content

Commit fbb60f8

Browse files
committed
build: treat ICU includes as system headers
These headers should be treated as system headers as we do not control them. Use target_include_directories so that we can use the `SYSTEM` option to indicate that they are system headers. It also simplifies the invocation by not directly modifying the underlying property.
1 parent c320e6f commit fbb60f8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -772,12 +772,10 @@ function(_add_swift_library_single target name)
772772

773773
if(SWIFTLIB_SINGLE_TARGET_LIBRARY)
774774
if(NOT "${SWIFT_${SWIFTLIB_SINGLE_SDK}_ICU_UC_INCLUDE}" STREQUAL "")
775-
set_property(TARGET "${target}" APPEND_STRING
776-
PROPERTY INCLUDE_DIRECTORIES "${SWIFT_${SWIFTLIB_SINGLE_SDK}_ICU_UC_INCLUDE}")
775+
target_include_directories("${target}" SYSTEM PRIVATE "${SWIFT_${SWIFTLIB_SINGLE_SDK}_ICU_UC_INCLUDE}")
777776
endif()
778777
if(NOT "${SWIFT_${SWIFTLIB_SINGLE_SDK}_ICU_I18N_INCLUDE}" STREQUAL "")
779-
set_property(TARGET "${target}" APPEND_STRING
780-
PROPERTY INCLUDE_DIRECTORIES "${SWIFT_${SWIFTLIB_SINGLE_SDK}_ICU_I18N_INCLUDE}")
778+
target_include_directories("${target}" SYSTEM PRIVATE "${SWIFT_${SWIFTLIB_SINGLE_SDK}_ICU_I18N_INCLUDE}")
781779
endif()
782780
endif()
783781

0 commit comments

Comments
 (0)