From ef5b3eef3f89dc2c9536fe9abce2d0c93cc9a364 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Tue, 19 Dec 2023 09:28:02 -0800 Subject: [PATCH] Don't overwrite wholegraph_ROOT if provided (#114) This change allows standard CMake specification of the C++ package directory (via `-Dwholegraph_ROOT`) to also work during the Python build. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Bradley Dice (https://github.com/bdice) - Ray Douglass (https://github.com/raydouglass) URL: https://github.com/rapidsai/wholegraph/pull/114 --- python/pylibwholegraph/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/pylibwholegraph/CMakeLists.txt b/python/pylibwholegraph/CMakeLists.txt index a8cd320e0..758fe3713 100644 --- a/python/pylibwholegraph/CMakeLists.txt +++ b/python/pylibwholegraph/CMakeLists.txt @@ -113,7 +113,9 @@ include(../../cpp/cmake/thirdparty/get_raft.cmake) #include(${CMAKE_CURRENT_LIST_DIR}/../cmake/thirdparty/nanobind.cmake) # use _ROOT here to take precedence over any other package -set(wholegraph_ROOT "$ENV{LIBWHOLEGRAPH_DIR}") +if (DEFINED ENV{LIBWHOLEGRAPH_DIR}) + set(wholegraph_ROOT "$ENV{LIBWHOLEGRAPH_DIR}") +endif() find_package(wholegraph "${RAPIDS_VERSION}.0" EXACT) message("WholeGraph") if (WHOLEGRAPH_FOUND)