Skip to content

Commit 7fa3595

Browse files
committed
[cmake] Make sure python headers are treated as system headers
1 parent 23f0cd5 commit 7fa3595

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/FindPython.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ ENDFUNCTION(EXEC_PYTHON_SCRIPT)
146146
# Define python_and_numpy interface target
147147
add_library(python_and_numpy INTERFACE)
148148
target_link_libraries(python_and_numpy INTERFACE ${PYTHON_LIBRARY} "${PYTHON_EXTRA_LIBS}")
149-
target_include_directories(python_and_numpy INTERFACE ${PYTHON_INCLUDE_DIRS} ${PYTHON_NUMPY_INCLUDE_DIR})
149+
target_include_directories(python_and_numpy SYSTEM INTERFACE ${PYTHON_INCLUDE_DIRS} ${PYTHON_NUMPY_INCLUDE_DIR})
150150
target_compile_options(python_and_numpy INTERFACE -Wno-register) # Some version of Python.h still use register
151151

152152
# The C API of numpy has changed with 1.7.0, the macro is a version switch in a few files of the libs.

0 commit comments

Comments
 (0)