summaryrefslogtreecommitdiff
path: root/Modules/FindMatlab.cmake
diff options
context:
space:
mode:
authorJorrit Olthuis <jorrit.olthuis46@hotmail.com>2022-12-20 18:56:34 +0100
committerBrad King <brad.king@kitware.com>2023-01-11 15:26:19 -0500
commit6683c20f22d38c654c5339f6b520bb1bd9b391e1 (patch)
tree6eb066dec70cdfb710cea8860f835e04be4ad65f /Modules/FindMatlab.cmake
parent51a0292d9cb24e13f6b600bc97d950ad4344cfa5 (diff)
downloadcmake-6683c20f22d38c654c5339f6b520bb1bd9b391e1.tar.gz
FindMatlab: Add SYSTEM include flag for matlab_add_mex
Add the `SYSTEM` flag for include directories provided by MATLAB, as the the pragmas used are not compatible with GCC and generate a warning. Fixes: #24166
Diffstat (limited to 'Modules/FindMatlab.cmake')
-rw-r--r--Modules/FindMatlab.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 07a9adf2e3..fe8f198242 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -1187,7 +1187,7 @@ function(matlab_add_mex)
${${prefix}_UNPARSED_ARGUMENTS})
endif()
- target_include_directories(${${prefix}_NAME} PRIVATE ${Matlab_INCLUDE_DIRS})
+ target_include_directories(${${prefix}_NAME} SYSTEM PRIVATE ${Matlab_INCLUDE_DIRS})
if(NOT ${prefix}_NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES)
if(Matlab_HAS_CPP_API)