Skip to content

Commit a81f2fc

Browse files
committed
buildfile: return empty if compiler not found for simplicity
1 parent 9169a40 commit a81f2fc

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

private/get_compiler.m

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
function [comp, shell] = get_compiler(lang)
2-
arguments (Input)
2+
arguments
33
lang (1,1) string {mustBeMember(lang, ["c", "c++", "fortran"])}
44
end
5-
arguments (Output)
6-
comp string {mustBeScalarOrEmpty}
7-
shell string {mustBeScalarOrEmpty}
8-
end
95

106
lang = lower(lang);
117

@@ -33,6 +29,7 @@
3329
comp = co.Details.CompilerExecutable;
3430
% disp(lang + " compiler: " + co.ShortName + " " + co.Name + " " + co.Version + " " + comp)
3531
end
32+
if ~strlength(comp), return, end
3633

3734
shell = string.empty;
3835
if ispc()

0 commit comments

Comments
 (0)