Skip to content

Commit

Permalink
HSL build hotfix (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
sshin23 authored Jul 20, 2022
1 parent f718b56 commit 3eb6bfc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/MadNLPHSL/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
deps/deps.jl
deps/build.log
deps/lib/
deps/src/
test/Project.toml
10 changes: 7 additions & 3 deletions lib/MadNLPHSL/deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,13 @@ for (lib, envlib, envsrc) in supported_library
source_path = ENV[envsrc]
targets = targets_dict[lib]

cd(source_path)
copied_path = joinpath(@__DIR__, "src", string(lib))
mkpath(joinpath(@__DIR__,"src"))
cp(source_path, copied_path; force = true)
cd(copied_path)

list = []
for (root, dir, files) in walkdir(source_path)
for (root, dir, files) in walkdir(copied_path)
for file in files
if file in targets
@info "$file source code detected."
Expand All @@ -107,10 +110,11 @@ for (lib, envlib, envsrc) in supported_library
end

succeeded = []

for target in targets
for (root, dir, file) in list
if file == target
name, ext = splitext(relpath(joinpath(root,file),source_path))
name, ext = splitext(relpath(joinpath(root,file),copied_path))
isvalid(`$FC -fopenmp -fPIC -c -O3 -o $name.o $name$ext`)
push!(succeeded, (name, ext))
end
Expand Down

0 comments on commit 3eb6bfc

Please sign in to comment.