Skip to content

Commit

Permalink
Remove CMake settings for OpenCL
Browse files Browse the repository at this point in the history
(cherry picked from commit 04e9446)
  • Loading branch information
jslee02 committed Sep 9, 2024
1 parent c9f2de4 commit 9e0e4b6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ if [ "$OSTYPE" = "linux-gnu" ]; then
install_prefix_option="-DCMAKE_INSTALL_PREFIX=/usr/"
elif [[ $OSTYPE = darwin* ]]; then
install_prefix_option="-DCMAKE_INSTALL_PREFIX=/usr/local/ -DCMAKE_INSTALL_RPATH=/usr/local/lib/"
cmake_args+=" -DOpenCLHeaders_DIR=$(brew --prefix opencl-headers)/share/cmake/OpenCLHeaders -DOpenCLHeadersCpp_DIR=$(brew --prefix opencl-clhpp-headers)/share/cmake/OpenCLHeadersCpp"
fi

if [ -n "$DART_USE_SYSTEM_IMGUI" ]; then
Expand Down
16 changes: 0 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,22 +135,6 @@ def build_extension(self, ext: CMakeExtension) -> None:
"-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs))
)

# Get the location of Homebrew prefix and specify the location of OpenCL headers for macOS
homebrew_prefix = (
subprocess.check_output(["brew", "--prefix"]).decode().strip()
)
opencl_headers_dir = (
f"{homebrew_prefix}/opt/opencl-headers/share/cmake/OpenCLHeaders"
)
opencl_headerscpp_dir = f"{homebrew_prefix}/opt/opencl-clhpp-headers/share/cmake/OpenCLHeadersCpp"
cmake_args.extend(
[
f"-DOpenCLHeaders_DIR={opencl_headers_dir}",
f"-DOpenCLHeadersCpp_DIR={opencl_headerscpp_dir}",
f"-DCMAKE_PREFIX_PATH={homebrew_prefix}",
]
)

print(f"[DEBUG] cmake_args: {cmake_args}")

# Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build level
Expand Down

0 comments on commit 9e0e4b6

Please sign in to comment.