Skip to content

Adds Pybind as a submodule and uses v2.6 #400

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

Merged
merged 7 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "python_bindings/pybind11"]
path = python_bindings/pybind11
url = https://github.com/pybind/pybind11
24 changes: 23 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,31 @@ add_subdirectory(test)
add_subdirectory(tools)
add_subdirectory(apps)
string(REPLACE " -Wmissing-declarations" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")

find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${TACO_PROJECT_DIR}/.git")
# Update submodules as needed
option(GIT_SUBMODULE "Check submodules during build" ON)
if(GIT_SUBMODULE)
message(STATUS "Submodule update")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()
endif()
endif()

if(NOT EXISTS "${TACO_PROJECT_DIR}/python_bindings/pybind11/CMakeLists.txt")
message(FATAL_ERROR "The submodules were not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.")
endif()

if(PYTHON)
add_subdirectory(python_bindings)
message("-- Will build Python extension")
add_definitions(-DPYTHON)
endif(PYTHON)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wmissing-declarations")
add_custom_target(src DEPENDS apps)

Expand Down
1 change: 1 addition & 0 deletions python_bindings/pybind11
Submodule pybind11 added at 8de777
70 changes: 0 additions & 70 deletions python_bindings/pybind11/.appveyor.yml

This file was deleted.

38 changes: 0 additions & 38 deletions python_bindings/pybind11/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions python_bindings/pybind11/.gitmodules

This file was deleted.

3 changes: 0 additions & 3 deletions python_bindings/pybind11/.readthedocs.yml

This file was deleted.

Loading