Skip to content

Commit

Permalink
chore: add libgfortran search for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshoku committed Jan 14, 2024
1 parent 216d5ff commit 3546cfc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ext/numo/tiny_linalg/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,12 @@
File.open("#{VENDOR_DIR}/tmp/openblas.log", 'a') { |f| f.puts(insstdout) }
abort("Failed to install OpenBLAS. Check the openblas.log file for more details: #{VENDOR_DIR}/tmp/openblas.log") unless insstatus.success?

FileUtils.cp("#{VENDOR_DIR}/lib/libopenblas.a", TINYLINALG_DIR) if on_windows

FileUtils.touch("#{VENDOR_DIR}/installed_#{OPENBLAS_VER}")
end
end

libopenblas_dir = on_windows ? TINYLINALG_DIR : "#{VENDOR_DIR}/lib"
abort('libopenblas is not found.') unless find_library('openblas', nil, libopenblas_dir)
abort('libgfortran is not found.') if on_windows && !have_library('gfortran')
abort('libopenblas is not found.') unless find_library('openblas', nil, "#{VENDOR_DIR}/lib")
abort('openblas_config.h is not found.') unless find_header('openblas_config.h', nil, "#{VENDOR_DIR}/include")
abort('cblas.h is not found.') unless find_header('cblas.h', nil, "#{VENDOR_DIR}/include")
abort('lapacke.h is not found.') unless find_header('lapacke.h', nil, "#{VENDOR_DIR}/include")
Expand Down

0 comments on commit 3546cfc

Please sign in to comment.