-
Notifications
You must be signed in to change notification settings - Fork 5
/
make.m
39 lines (30 loc) · 824 Bytes
/
make.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function [] = make(openmp)
if nargin < 1
openmp = 1;
end
pwd_ = pwd();
mdir = fileparts(mfilename('fullpath'));
% doesn't work on matlab versions < 2016b
makefiles = dir('src/**/make.m');
if isempty(makefiles)
makefiles = [
struct('folder', fullfile(mdir, 'src/unwrap/mex')), ...
struct('folder', fullfile(mdir, 'src/inversion/mex')), ...
struct('folder', fullfile(mdir, 'src/utils/fd/mex')), ...
struct('folder', fullfile(mdir, 'src/utils/poisson_solver/mex')), ...
];
end
ex = [];
try
for ii = 1:length(makefiles)
cd(makefiles(ii).folder);
make(openmp);
end
catch ex
% void
end
cd(pwd_);
if ~isempty(ex)
rethrow(ex);
end
end