Skip to content
Open
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
6 changes: 2 additions & 4 deletions lzero/mcts/ctree/ctree_alphazero/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ project(mcts_alphazero VERSION 1.0)
# This is required for embedding Python in the project
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)

# Add pybind11 as a subdirectory,
# so that its build files are generated alongside the current project.
# This is necessary because the current project depends on pybind11
add_subdirectory(pybind11)
# Find pybind11 package installed via pip
find_package(pybind11 CONFIG REQUIRED)

# Add two .cpp files to the mcts_alphazero module
# These files are compiled and linked into the module
Expand Down
7 changes: 5 additions & 2 deletions lzero/mcts/ctree/ctree_alphazero/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ mkdir -p build
# Navigate into the "build" directory
cd build || exit

# Run cmake on the parent directory with the specified architecture
cmake .. -DCMAKE_OSX_ARCHITECTURES="arm64"
# Get pybind11 cmake directory
PYBIND11_CMAKE_DIR=$(python -c "import pybind11; print(pybind11.get_cmake_dir())")

# Run cmake on the parent directory with the specified architecture and pybind11 path
cmake .. -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_PREFIX_PATH="$PYBIND11_CMAKE_DIR"

# Run the "make" command to compile the project
make
Loading