Skip to content

Commit

Permalink
240217.032035.HKT simplify linker_options in compile.m
Browse files Browse the repository at this point in the history
  • Loading branch information
zaikunzhang committed Feb 16, 2024
1 parent 732d367 commit f975d9f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions matlab/setup_tools/compile.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,7 @@ function compile(solvers, mexdir, fortd, gateways, options)
% the latter is suggested at https://www.mathworks.com/help/matlab/ref/mex.html.
linker_options = '';
if ismac && contains(compiler_manufacturer, 'intel') % macOS with Intel compiler
[status, ~] = system('type echo && type sed'); % Check if `echo` and `sed` are available.
if status == 0
linker_options = 'LDFLAGSVER="$(echo $LDFLAGSVER | sed "s/-undefined error//g") -undefined dynamic_lookup"';
end
linker_options = 'LDFLAGSVER="$LDFLAGSVER -undefined dynamic_lookup"';
end

% MEX options shared by all compiling processes below.
Expand Down

0 comments on commit f975d9f

Please sign in to comment.