Skip to content

Commit da708d6

Browse files
authored
Merge pull request #953 from PhilipDeegan/pybindwerror
minimized deps for cpp_etc / etc
2 parents a9ae15d + 4abf3c2 commit da708d6

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

src/initializer/python_data_provider.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,8 @@
66

77
#include "initializer/data_provider.hpp"
88

9-
#include "core/def/pragma_disable.hpp"
10-
11-
// clang-format off
12-
DISABLE_WARNING(shadow, shadow-field-in-constructor-modified, 42)
13-
14-
#undef HAVE_SYS_TIMES_H // included in python again, possibly with different value
15-
#undef HAVE_UNISTD_H
16-
179
#include <pybind11/embed.h> // everything needed for embedding
1810
#include <pybind11/functional.h>
19-
ENABLE_WARNING(shadow, shadow-field-in-constructor-modified, 42)
20-
// clang-format on
2111

2212
namespace py = pybind11;
2313

src/python3/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
2727

2828

2929
pybind11_add_module(cpp_etc cpp_etc.cpp)
30-
target_link_libraries(cpp_etc PUBLIC phare_simulator)
3130
target_compile_options(cpp_etc PRIVATE ${PHARE_WERROR_FLAGS} -DPHARE_HAS_HIGHFIVE=${PHARE_HAS_HIGHFIVE})
31+
target_link_libraries(cpp_etc PUBLIC phare_amr) # gives us samrai header includes
3232
set_target_properties(cpp_etc
3333
PROPERTIES
3434
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/pybindlibs"

src/python3/cpp_etc.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11

2+
#include "core/def.hpp"
3+
#include "core/def/phare_config.hpp"
4+
25
#include "python3/pybind_def.hpp"
3-
#include "simulator/simulator.hpp"
46

5-
#include "core/def/phare_config.hpp"
7+
#include "hdf5/phare_hdf5.hpp"
68

9+
#if PHARE_HAS_HIGHFIVE
10+
#include "hdf5/detail/h5/h5_file.hpp"
11+
#endif
712

813
#include "amr/wrappers/hierarchy.hpp" // for HierarchyRestarter::getRestartFileFullPath
914

src/python3/pybind_def.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
#include "pybind11/stl.h"
1212
#include "pybind11/numpy.h"
13-
#undef HAVE_SYS_TIMES_H // included in python again, possibly with different value
14-
#undef HAVE_UNISTD_H
13+
1514

1615
namespace PHARE::pydata
1716
{

0 commit comments

Comments
 (0)