@@ -230,10 +230,10 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
230
230
# than llvm and the header files should be found first (even though the
231
231
# LLVM_INCLUDE_DIRS) contain clang headers, too.
232
232
if (USE_CLING )
233
- include_directories (${CLING_INCLUDE_DIRS} )
233
+ include_directories (SYSTEM ${CLING_INCLUDE_DIRS} )
234
234
endif (USE_CLING )
235
- include_directories (${CLANG_INCLUDE_DIRS} )
236
- include_directories (${LLVM_INCLUDE_DIRS} )
235
+ include_directories (SYSTEM ${CLANG_INCLUDE_DIRS} )
236
+ include_directories (SYSTEM ${LLVM_INCLUDE_DIRS} )
237
237
separate_arguments (LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS} )
238
238
add_definitions (${LLVM_DEFINITIONS_LIST} )
239
239
@@ -253,13 +253,13 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
253
253
#
254
254
# FIXME: We only support in-tree builds of clang, that is clang being built
255
255
# in llvm_src/tools/clang.
256
- include_directories (${LLVM_BUILD_MAIN_SRC_DIR} /tools/clang/include/ )
256
+ include_directories (SYSTEM ${LLVM_BUILD_MAIN_SRC_DIR} /tools/clang/include/ )
257
257
258
258
if (NOT LLVM_BUILD_BINARY_DIR )
259
259
message (FATAL "LLVM_BUILD_* values should be available for the build tree" )
260
260
endif ()
261
261
262
- include_directories (${LLVM_BUILD_BINARY_DIR} /tools/clang/include/ )
262
+ include_directories (SYSTEM ${LLVM_BUILD_BINARY_DIR} /tools/clang/include/ )
263
263
endif ()
264
264
265
265
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib/ )
@@ -303,13 +303,13 @@ endif ()
303
303
304
304
# FIXME: Use merge this with the content from the LLVMConfig and ClangConfig.
305
305
if (NOT CPPINTEROP_BUILT_STANDALONE )
306
- include_directories (BEFORE
306
+ include_directories (BEFORE SYSTEM
307
307
${CMAKE_CURRENT_BINARY_DIR} /../clang/include
308
308
${CMAKE_CURRENT_SOURCE_DIR} /../clang/include
309
309
)
310
310
endif ()
311
311
312
- include_directories (BEFORE
312
+ include_directories (BEFORE SYSTEM
313
313
${CMAKE_CURRENT_BINARY_DIR} /include
314
314
${CMAKE_CURRENT_SOURCE_DIR} /include
315
315
)
0 commit comments