Skip to content

Commit

Permalink
Remove pybind11 from repo. Add pybind11 path to gitignore. Simplify p…
Browse files Browse the repository at this point in the history
…ybind11 configuration.
  • Loading branch information
DerNils-git committed Jan 6, 2024
1 parent 1c71d9a commit 0084e9b
Show file tree
Hide file tree
Showing 60 changed files with 5 additions and 22,084 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ CMakeUserPresets.json
share/openPMD/thirdParty/json/
share/openPMD/thirdParty/toml11/
share/openPMD/thirdParty/catch2/
share/openPMD/thirdParty/pybind11/

#########
# Tools #
Expand Down
23 changes: 4 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ openpmd_option(PYTHON "Enable Python bindings" AUTO)
option(openPMD_INSTALL "Add installation targets" ON)
option(openPMD_INSTALL_RPATH "Add RPATHs to installed binaries" ON)
option(openPMD_HAVE_PKGCONFIG "Generate a .pc file for pkg-config" ON)
option(openPMD_USE_INTERNAL_PYBIND11 "Use internally shipped pybind11" ON)

option(openPMD_USE_INVASIVE_TESTS "Enable unit tests that modify source code" OFF)
option(openPMD_USE_VERIFY "Enable internal VERIFY (assert) macro independent of build type" ON)
Expand Down Expand Up @@ -391,25 +390,12 @@ endif()
set(_PY_DEV_MODULE Development.Module)
if(openPMD_USE_PYTHON STREQUAL AUTO)
find_package(Python 3.8.0 COMPONENTS Interpreter ${_PY_DEV_MODULE})
if(Python_FOUND)
find_package(pybind11 CONFIG)
if(NOT pybind11_FOUND)
message(STATUS "Fetching PyBind11 from https://github.com/pybind/pybind11")
FetchContent_Declare(
pybind11
GIT_REPOSITORY https://github.com/pybind/pybind11.git
GIT_TAG v2.11.1
SOURCE_DIR "${openPMD_SOURCE_DIR}/share/openPMD/thirdParty/pybind11/"
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(pybind11)
endif()
set(openPMD_HAVE_PYTHON TRUE)
else()
set(openPMD_HAVE_PYTHON FALSE)
endif()
elseif(openPMD_USE_PYTHON)
find_package(Python COMPONENTS Interpreter ${_PY_DEV_MODULE} REQUIRED)
else()
set(openPMD_HAVE_PYTHON FALSE)
endif()
if(Python_FOUND)
find_package(pybind11 CONFIG)
if(NOT pybind11_FOUND)
message(STATUS "Fetching PyBind11 from https://github.com/pybind/pybind11")
Expand All @@ -427,7 +413,6 @@ else()
set(openPMD_HAVE_PYTHON FALSE)
endif()


# Targets #####################################################################
#
set(CORE_SOURCE
Expand Down
322 changes: 0 additions & 322 deletions share/openPMD/thirdParty/pybind11/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 0084e9b

Please sign in to comment.