Skip to content
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

adios2 2.10.0 #169547

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 64 additions & 8 deletions Formula/a/adios2.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
class Adios2 < Formula
desc "Next generation of ADIOS developed in the Exascale Computing Program"
homepage "https://adios2.readthedocs.io"
url "https://github.com/ornladios/ADIOS2/archive/refs/tags/v2.9.2.tar.gz"
sha256 "78309297c82a95ee38ed3224c98b93d330128c753a43893f63bbe969320e4979"
license "Apache-2.0"
revision 2
head "https://github.com/ornladios/ADIOS2.git", branch: "master"

stable do
url "https://github.com/ornladios/ADIOS2/archive/refs/tags/v2.10.0.tar.gz"
sha256 "e5984de488bda546553dd2f46f047e539333891e63b9fe73944782ba6c2d95e4"

# fix pugixml target name
# upstream patch ref, https://github.com/ornladios/ADIOS2/pull/4135
# https://github.com/ornladios/ADIOS2/pull/4142
patch :DATA
end

livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
Expand Down Expand Up @@ -92,18 +99,67 @@ def install
system "cmake", "--build", "build"
system "cmake", "--install", "build"

(pkgshare/"test").install "examples/hello/bpWriter/helloBPWriter.cpp"
(pkgshare/"test").install "examples/hello/bpWriter/helloBPWriter.py"
(pkgshare/"test").install "examples/hello/bpWriter/bpWriter.cpp"
(pkgshare/"test").install "examples/hello/bpWriter/bpWriter.py"
end

test do
adios2_config_flags = Utils.safe_popen_read(bin/"adios2-config", "--cxx").chomp.split
system "mpic++", pkgshare/"test/helloBPWriter.cpp", *adios2_config_flags
system "mpic++", pkgshare/"test/bpWriter.cpp", *adios2_config_flags
system "./a.out"
assert_predicate testpath/"myVector_cpp.bp", :exist?

system python3, "-c", "import adios2"
system python3, pkgshare/"test/helloBPWriter.py"
assert_predicate testpath/"npArray.bp", :exist?
system python3, pkgshare/"test/bpWriter.py"
assert_predicate testpath/"bpWriter-py.bp", :exist?
end
end

__END__
diff --git a/source/adios2/toolkit/remote/CMakeLists.txt b/source/adios2/toolkit/remote/CMakeLists.txt
index a739e1a..fdea6ec 100644
--- a/source/adios2/toolkit/remote/CMakeLists.txt
+++ b/source/adios2/toolkit/remote/CMakeLists.txt
@@ -6,15 +6,11 @@
if (NOT ADIOS2_USE_PIP)
add_executable(adios2_remote_server ./remote_server.cpp remote_common.cpp)

- target_link_libraries(adios2_remote_server PUBLIC EVPath::EVPath adios2_core adios2sys
- PRIVATE $<$<PLATFORM_ID:Windows>:shlwapi>)
+ target_link_libraries(adios2_remote_server
+ PUBLIC EVPath::EVPath adios2_core adios2sys
+ PRIVATE adios2::thirdparty::pugixml $<$<PLATFORM_ID:Windows>:shlwapi>)

- get_property(pugixml_headers_path
- TARGET pugixml
- PROPERTY INTERFACE_INCLUDE_DIRECTORIES
- )
-
- target_include_directories(adios2_remote_server PRIVATE ${PROJECT_BINARY_DIR} ${pugixml_headers_path})
+ target_include_directories(adios2_remote_server PRIVATE ${PROJECT_BINARY_DIR})

set_property(TARGET adios2_remote_server PROPERTY OUTPUT_NAME adios2_remote_server${ADIOS2_EXECUTABLE_SUFFIX})
install(TARGETS adios2_remote_server EXPORT adios2
diff --git a/source/utils/CMakeLists.txt b/source/utils/CMakeLists.txt
index 30dd484..01f5f93 100644
--- a/source/utils/CMakeLists.txt
+++ b/source/utils/CMakeLists.txt
@@ -13,17 +13,11 @@ configure_file(
add_executable(bpls ./bpls/bpls.cpp)
target_link_libraries(bpls
PUBLIC adios2_core adios2sys
- PRIVATE $<$<PLATFORM_ID:Windows>:shlwapi>)
-
-get_property(pugixml_headers_path
- TARGET pugixml
- PROPERTY INTERFACE_INCLUDE_DIRECTORIES
-)
+ PRIVATE adios2::thirdparty::pugixml $<$<PLATFORM_ID:Windows>:shlwapi>)

target_include_directories(bpls PRIVATE
${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/bindings/C
- ${pugixml_headers_path}
)

set_property(TARGET bpls PROPERTY OUTPUT_NAME bpls${ADIOS2_EXECUTABLE_SUFFIX})
Loading