File tree Expand file tree Collapse file tree 3 files changed +39
-37
lines changed Expand file tree Collapse file tree 3 files changed +39
-37
lines changed Original file line number Diff line number Diff line change 3131 % see example/Filesystem.java for this working in plain Java.
3232 % see example/javaCreateSymbolicLink.m for a non-working attempt in Matlab.
3333
34- disp(" use 'buildtool mex' or 'legacy_mex_build() ' for faster symlink creation" )
34+ disp(" 'buildtool mex' for faster symlink creation" )
3535
3636 if ispc
3737 cmd = " pwsh -c " + ' "' + " New-Item -ItemType SymbolicLink -Path " + link + ...
Original file line number Diff line number Diff line change @@ -108,3 +108,41 @@ function publishTask(context)
108108end
109109
110110end
111+
112+
113+ function [compiler_id , compiler_opt ] = get_compiler_options()
114+
115+ cxx = mex .getCompilerConfigurations(' c++' );
116+ flags = cxx .Details .CompilerFlags ;
117+
118+ msvc = startsWith(cxx .ShortName , " MSVCPP" );
119+
120+ std = " -std=c++17" ;
121+ compiler_id = " " ;
122+ % FIXME: Windows oneAPI
123+ if msvc
124+ std = " /std:c++17" ;
125+ elseif ismac
126+ % keep for if-logic
127+ elseif isunix && cxx .ShortName == " g++"
128+ % FIXME: update when desired GCC != 10 for newer Matlab
129+ if isMATLABReleaseOlderThan(" R2025b" ) && ~startsWith(cxx .Version , " 10" )
130+ % https://www.mathworks.com/help/matlab/matlab_external/choose-c-or-c-compilers.html
131+ % https://www.mathworks.com/help/matlab/matlab_external/change-default-gcc-compiler-on-linux-system.html
132+ [s , ~ ] = system(" which g++-10" );
133+ if s == 0
134+ compiler_id = " CXX=g++-10" ;
135+ else
136+ warning(" GCC 10 not found, using default GCC " + cxx .Version + " may fail on runtime" )
137+ end
138+ end
139+ end
140+
141+ opt = flags + " " + std ;
142+ if msvc
143+ compiler_opt = " COMPFLAGS=" + opt ;
144+ else
145+ compiler_opt = " CXXFLAGS=" + opt ;
146+ end
147+
148+ end
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments