Skip to content
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

Add pybind11_abseil dependency #873

Merged
merged 1 commit into from
Jul 4, 2022
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
1 change: 1 addition & 0 deletions open_spiel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ set (OPEN_SPIEL_CORE_FILES
# We add the subdirectory here so open_spiel_core can #include absl.
set(ABSL_PROPAGATE_CXX_STD ON)
add_subdirectory (abseil-cpp)
include_directories (abseil-cpp)

# Just the core without any of the games
add_library(open_spiel_core OBJECT ${OPEN_SPIEL_CORE_FILES})
Expand Down
1 change: 1 addition & 0 deletions open_spiel/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ endif()


# List of all Python bindings to add to pyspiel.
include_directories (../pybind11_abseil ../../pybind11/include)
set(PYTHON_BINDINGS ${PYTHON_BINDINGS}
pybind11/algorithms_corr_dist.cc
pybind11/algorithms_corr_dist.h
Expand Down
1 change: 1 addition & 0 deletions open_spiel/python/pybind11/games_euchre.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "open_spiel/games/euchre.h"
#include "open_spiel/python/pybind11/pybind11.h"
#include "open_spiel/spiel.h"
#include "pybind11_abseil/absl_casters.h"

PYBIND11_SMART_HOLDER_TYPE_CASTERS(open_spiel::euchre::EuchreGame);
PYBIND11_SMART_HOLDER_TYPE_CASTERS(open_spiel::euchre::EuchreState);
Expand Down
10 changes: 9 additions & 1 deletion open_spiel/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ fi

DIR="open_spiel/abseil-cpp"
if [[ ! -d ${DIR} ]]; then
cached_clone -b '20211102.0' --single-branch --depth 1 https://github.com/abseil/abseil-cpp.git open_spiel/abseil-cpp
cached_clone -b '20211102.0' --single-branch --depth 1 https://github.com/abseil/abseil-cpp.git ${DIR}
fi

DIR="open_spiel/pybind11_abseil"
if [[ ! -d ${DIR} ]]; then
cached_clone -b 'master' --single-branch --depth 1 https://github.com/pybind/pybind11_abseil.git ${DIR}
pushd ${DIR}
git checkout '73992b5'
popd
fi

# Optional dependencies.
Expand Down