From d548c9036970aebff02d6e400ea8aa4675192eb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Fri, 11 Aug 2023 11:00:30 +0200 Subject: [PATCH 1/2] Install CxxWrap Julia package and fix CI run --- .github/workflows/linux.yml | 4 ++-- .github/workflows/macos.yml | 4 ++-- src/binding/julia/tests/minimal_example.jl | 11 ----------- 3 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 src/binding/julia/tests/minimal_example.jl diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ed82bea1b3..b9fa7b4f0b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -263,9 +263,9 @@ jobs: -DopenPMD_USE_PYTHON=ON \ -DopenPMD_USE_INVASIVE_TESTS=ON cmake --build build --parallel 2 + # Install the Julia side of CxxWrap + julia --eval 'using Pkg; Pkg.add("CxxWrap")' ctest --test-dir build --output-on-failure - /usr/local/julia-1.7.3/bin/julia --eval 'using Pkg; Pkg.add("CxxWrap")' - /usr/local/julia-1.7.3/bin/julia src/binding/julia/tests/minimal_example.jl musllinux_py10: runs-on: ubuntu-20.04 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 1cf37b3377..7f4962760a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -49,9 +49,9 @@ jobs: -DopenPMD_USE_PYTHON=ON \ -DopenPMD_USE_INVASIVE_TESTS=ON cmake --build build --parallel 3 - ctest --test-dir build --verbose + # Install the Julia side of CxxWrap julia --eval 'using Pkg; Pkg.add("CxxWrap")' - julia src/binding/julia/tests/minimal_example.jl + ctest --test-dir build --verbose appleclang13_py: runs-on: macos-11 diff --git a/src/binding/julia/tests/minimal_example.jl b/src/binding/julia/tests/minimal_example.jl deleted file mode 100644 index 0734a80ad9..0000000000 --- a/src/binding/julia/tests/minimal_example.jl +++ /dev/null @@ -1,11 +0,0 @@ -module openPMD -using CxxWrap -@wrapmodule("build/libopenPMD.jl") -__init__() = @initcxx -end - -Base.getindex(cont::openPMD.CXX_Container, index::Integer) = openPMD.cxx_getindex(cont, index) - -series = openPMD.CXX_Series("sample.json", openPMD.ACCESS_CREATE) -openPMD.cxx_iterations(series)[100] -openPMD.cxx_flush(series, "{}") From d427b1917ab8f40b14b2f21ac015e21ec018097a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Fri, 18 Aug 2023 14:44:33 +0200 Subject: [PATCH 2/2] Update RPATH setting to generalized method --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fac3331b87..6a5e4258aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -403,7 +403,6 @@ endif() if(openPMD_HAVE_JULIA) get_target_property(JlCxx_location JlCxx::cxxwrap_julia LOCATION) get_filename_component(JlCxx_location ${JlCxx_location} DIRECTORY) - set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${JlCxx_location}") message(STATUS "Found JlCxx version ${JlCxx_VERSION} at ${JlCxx_location}") endif() @@ -1133,6 +1132,9 @@ if(openPMD_INSTALL) if(openPMD_HAVE_PYTHON) list(APPEND openPMD_INSTALL_RPATH_TARGET_NAMES openPMD.py) endif() + if(openPMD_HAVE_JULIA) + list(APPEND openPMD_INSTALL_RPATH_TARGET_NAMES openPMD.jl) + endif() if(NOT DEFINED CMAKE_INSTALL_RPATH) if(APPLE) set_target_properties(${openPMD_INSTALL_RPATH_TARGET_NAMES} PROPERTIES