-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hdf5: use CMake #157329
hdf5: use CMake #157329
Changes from 4 commits
8e94b1b
cb1ee54
b63179e
055cfaf
315e454
5fa1a98
799c7f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,8 @@ | |
sha256 cellar: :any_skip_relocation, x86_64_linux: "45a3ba08b9c14d54fa5afbfe214e8397af81e50e1b3a2b5bf8d97cc5e88b898f" | ||
end | ||
|
||
depends_on "autoconf" => :build | ||
depends_on "automake" => :build | ||
depends_on "libtool" => :build | ||
depends_on "cmake" => :build | ||
depends_on "pkg-config" => :test | ||
depends_on "gcc" # for gfortran | ||
depends_on "libaec" | ||
|
||
|
@@ -43,35 +42,23 @@ | |
"settingsdir=$(libdir)", | ||
"settingsdir=#{pkgshare}" | ||
|
||
system "autoreconf", "--force", "--install", "--verbose" | ||
|
||
args = %W[ | ||
--disable-dependency-tracking | ||
--disable-silent-rules | ||
--enable-build-mode=production | ||
--enable-fortran | ||
--enable-cxx | ||
--prefix=#{prefix} | ||
--with-szlib=#{Formula["libaec"].opt_prefix} | ||
] | ||
args << "--with-zlib=#{Formula["zlib"].opt_prefix}" if OS.linux? | ||
|
||
system "./configure", *args | ||
system "cmake", "-S", ".", "-B", "build", *std_cmake_args | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. try to add "-DCMAKE_CXX_FLAGS=-fmacro-prefix-map=$PWD=.", "-DCMAKE_C_FLAGS="-fmacro-prefix-map=$PWD=." or something similar to replace absolute paths in error messages with a dot.
SMillerDev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Avoid shims in settings file | ||
inreplace_files = %w[ | ||
src/H5build_settings.c | ||
src/libhdf5.settings | ||
src/Makefile | ||
build/src/H5build_settings.c | ||
build/src/libhdf5.settings | ||
SMillerDev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
build/CMakeFiles/h5cc | ||
build/CMakeFiles/h5hlcc | ||
] | ||
|
||
inreplace inreplace_files, Superenv.shims_path/ENV.cxx, ENV.cxx | ||
inreplace inreplace_files, Superenv.shims_path/ENV.cc, ENV.cc | ||
|
||
system "make", "install" | ||
system "cmake", "--build", "build" | ||
system "cmake", "--install", "build" | ||
end | ||
|
||
test do | ||
Check failure on line 61 in Formula/h/hdf5.rb GitHub Actions / macOS 14-arm64`brew test --verbose hdf5` failed on macOS Sonoma (14) on Apple Silicon!
Check failure on line 61 in Formula/h/hdf5.rb GitHub Actions / macOS 13-arm64`brew test --verbose hdf5` failed on macOS Ventura (13) on Apple Silicon!
Check failure on line 61 in Formula/h/hdf5.rb GitHub Actions / macOS 12-arm64`brew test --verbose hdf5` failed on macOS Monterey (12) on Apple Silicon!
|
||
(testpath/"test.c").write <<~EOS | ||
#include <stdio.h> | ||
#include "hdf5.h" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing in your cmake config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
potentially more.