diff options
author | Jorrit Olthuis <jorrit.olthuis46@hotmail.com> | 2022-12-20 17:56:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-01-11 20:26:19 (GMT) |
commit | 6683c20f22d38c654c5339f6b520bb1bd9b391e1 (patch) | |
tree | 6eb066dec70cdfb710cea8860f835e04be4ad65f | |
parent | 51a0292d9cb24e13f6b600bc97d950ad4344cfa5 (diff) | |
download | CMake-6683c20f22d38c654c5339f6b520bb1bd9b391e1.zip CMake-6683c20f22d38c654c5339f6b520bb1bd9b391e1.tar.gz CMake-6683c20f22d38c654c5339f6b520bb1bd9b391e1.tar.bz2 |
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
-rw-r--r-- | Modules/FindMatlab.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 07a9adf..fe8f198 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) |