Skip to content

Commit

Permalink
Fix SWIG build (#1159)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethrj committed Apr 2, 2024
1 parent 6d3aada commit 3a31f2e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build-spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,9 @@ jobs:
with:
path: ${{env.CCACHE_DIR}}
key: ccache-${{env.CMAKE_PRESET}}-${{matrix.geant}}-${{github.run_id}}
# NOTE: remove ccache-spack-clang-15* in follow-up PR
restore-keys: |
ccache-${{env.CMAKE_PRESET}}-${{matrix.geant}}
ccache-${{env.CMAKE_PRESET}}
ccache-spack-clang-15-${{matrix.geant}}-
ccache-spack-clang-15-
- name: Zero ccache stats
run: |
ccache -z
Expand Down
21 changes: 16 additions & 5 deletions interface/celeritas.i
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@
}
}

//---------------------------------------------------------------------------//
// STD
//---------------------------------------------------------------------------//

namespace std
{
%ignore hash;
template<class T>
struct hash;
};

%ignore *::operator++;

//---------------------------------------------------------------------------//
// CORECEL
//---------------------------------------------------------------------------//
Expand All @@ -57,6 +70,7 @@
%ignore celeritas::Byte;
%include "corecel/Macros.hh"
%include "corecel/Types.hh"
%import "corecel/OpaqueId.hh"

%template(VecReal) std::vector<celeritas::real_type>;

Expand All @@ -65,15 +79,12 @@
//---------------------------------------------------------------------------//

%{
#include "celeritas/Types.hh"
#include "celeritas/Units.hh"
#include "celeritas/Constants.hh"
%}

namespace celeritas
{
enum class UnitSystem;
}

%import "celeritas/Types.hh"
%include "celeritas/Units.hh"
%include "celeritas/Constants.hh"

Expand Down
3 changes: 2 additions & 1 deletion scripts/cmake-presets/ci-ubuntu-github.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@
},
{
"name": "reldeb-vecgeom",
"description": "Build with release, assertions, VecGeom",
"description": "Build with release, assertions, VecGeom, SWIG",
"inherits": [".vecgeom", "spack"],
"cacheVariables": {
"CELERITAS_USE_SWIG": {"type": "BOOL", "value": "ON"}
}
},
{
Expand Down
2 changes: 0 additions & 2 deletions src/celeritas/io/ImportOpticalMaterial.hh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

#include <vector>

#include "celeritas/phys/PDGNumber.hh"

#include "ImportPhysicsVector.hh"
#include "ImportUnits.hh"

Expand Down
2 changes: 0 additions & 2 deletions src/celeritas/io/ImportPhysicsTable.hh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

#include <vector>

#include "celeritas/Units.hh"

#include "ImportPhysicsVector.hh"
#include "ImportUnits.hh"

Expand Down

0 comments on commit 3a31f2e

Please sign in to comment.