Skip to content

Commit 94621a6

Browse files
committed
ci: don't override compiler
1 parent 50ad4b6 commit 94621a6

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ jobs:
4848

4949
- uses: ./.github/workflows/composite-install-matlab
5050

51-
- name: Linux CXX
52-
if: ${{ matrix.os == 'ubuntu-22.04' }}
53-
run: echo "CXXMEX=g++-10" >> $GITHUB_ENV
54-
5551
- name: Fortran FC
5652
if: runner.os == 'macOS'
5753
run: echo "FC=gfortran-14" >> $GITHUB_ENV

buildfile.m

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ function build_exe(context)
290290

291291
function [compiler_opt, linker_opt] = get_compiler_options()
292292
arguments (Output)
293-
compiler_opt (1,:) string
293+
compiler_opt (1,1) string
294294
linker_opt (1,1) string
295295
end
296296

@@ -301,20 +301,12 @@ function build_exe(context)
301301

302302
std = "-std=c++17";
303303
% mex() can't handle string.empty
304-
compiler_id = "";
305304
linker_opt = "";
306305

307-
% this override is mostly for CI. Ensure auto-compiler flags are still correct if using this.
308-
cxxenv = getenv("CXXMEX");
309-
if ~isempty(cxxenv)
310-
compiler_id = "CXX=" + cxxenv;
311-
disp("MEX compiler override: " + compiler_id)
312-
end
313-
314306
if msvc
315307
std = "/std:c++17";
316308
% on Windows, Matlab doesn't register unsupported MSVC or oneAPI
317-
elseif ~strlength(compiler_id) && cxx.ShortName == "g++"
309+
elseif cxx.ShortName == "g++"
318310
if ~stdlib.version_atleast(cxx.Version, "8")
319311
warning("g++ 8 or newer is required for MEX, detected g++" + cxx.Version)
320312
end
@@ -331,10 +323,6 @@ function build_exe(context)
331323
compiler_opt = "CXXFLAGS=" + opt;
332324
end
333325

334-
if strlength(compiler_id)
335-
compiler_opt = [compiler_id, compiler_opt];
336-
end
337-
338326
end
339327

340328

0 commit comments

Comments
 (0)