I'm would like to use some C++17 features in my library. The library is header only, and compiles with MSVC 15.19 v14.16 toolset and CUDA 11.3 that are installed on my machine. I wrap this library in a mex function which acts as an interface for inputs and outputs from and to Matlab, but having trouble compiling it.
I use the following command to compile:
mexcuda -v -R2018a '-LC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\lib\x64' -lcublas ...
NVCC_FLAGS='-std=c++17 -Xcompiler=/std:c++17 --default-stream legacy'...
Error using mex
nvcc fatal : Value 'c++17' is not defined for option 'std'
In the nvcc_msvcpp2017.xml build configuration file I noticed that CUDA 10.1 is referenced. This version indeed does not support C++17 standard, but I find it bizzare that anything would compile at all seing as I do not have CUDA 10.1 installed on my system (unless it shipped with Matlab). I tried creating a custom .xml file to correct the versioning but that did not solve the issue, my guess though is that I need to adjust some environment variable, but I have no clue which one.
Thank for your help!