Skip to content

Commit

Permalink
fix build paths
Browse files Browse the repository at this point in the history
  • Loading branch information
RSchwan committed Jun 17, 2024
1 parent 35f0f14 commit bc4d25a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
8 changes: 1 addition & 7 deletions interfaces/octave/make_piqp.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,10 @@ function make_piqp(varargin)
if any(strcmpi(what,'oct')) || any(strcmpi(what,'all'))
fprintf('Compiling PIQP Octave interface...\n');

% Change directory back to octave interface
cd(piqp_octave_dir);

mkoctfile('-O3', '-DNDEBUG', '-march=native', '-std=gnu++14', ...
['-I', fullfile(piqp_dir, 'include')], ...
['-I', eigen_include_dir], ...
'-o', 'piqp_oct.oct', 'piqp_oct.cpp');
'-o', 'piqp_oct.oct', fullfile(piqp_dir, 'interfaces/octave/piqp_oct.cpp'));

fprintf('[done]\n');

Expand All @@ -71,9 +68,6 @@ function make_piqp(varargin)
if any(strcmpi(what,'clean'))
fprintf('Cleaning build related files...\n');

% Change directory back to octave interface
cd(piqp_octave_dir);

% Delete oct file
octfiles = dir('*.oct');
for i = 1 : length(octfiles)
Expand Down
7 changes: 1 addition & 6 deletions interfaces/octave/package/pre_install.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
% LICENSE file in the root directory of this source tree.

function pre_install (in)
octave_interface_dir = fullfile(pwd, 'src/piqp/interfaces/octave');
addpath(octave_interface_dir);

make_piqp();
copyfile(fullfile(octave_interface_dir, 'piqp_oct.oct'), fullfile(pwd, 'inst/piqp_oct.oct'));

rmpath(octave_interface_dir)
movefile('piqp_oct.oct', 'inst/piqp_oct.oct');
endfunction
1 change: 1 addition & 0 deletions interfaces/octave/package_piqp.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
copyfile(fullfile(piqp_octave_dir, 'package'), pkg_dir);
mkdir(fullfile(pkg_dir, 'inst'))
copyfile(fullfile(piqp_octave_dir, 'piqp.m'), fullfile(pkg_dir, 'inst/piqp.m'));
copyfile(fullfile(piqp_octave_dir, 'make_piqp.m'), fullfile(pkg_dir, 'make_piqp.m'));

mkdir(fullfile(pkg_dir, 'src'));
copyfile(piqp_dir, fullfile(pkg_dir, 'src/piqp'));
Expand Down

0 comments on commit bc4d25a

Please sign in to comment.