-
Notifications
You must be signed in to change notification settings - Fork 16
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
simplify wholegraph CMake, other small building and testing changes #102
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ PROJECT_NAME = "WholeGraph C API" | |
# could be handy for archiving the generated documentation or if some version | ||
# control system is used. | ||
|
||
PROJECT_NUMBER = 25.02 | ||
PROJECT_NUMBER = $(RAPIDS_VERSION_MAJOR_MINOR) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is what other RAPIDS projects are doing, e.g. One less hard-coded version is nice for:
|
||
|
||
# Using the PROJECT_BRIEF tag one can provide an optional one line description | ||
# for a project that appears at the top of each page and should give viewer a | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#============================================================================= | ||
# Copyright (c) 2018-2024, NVIDIA CORPORATION. | ||
# Copyright (c) 2018-2025, NVIDIA CORPORATION. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -17,23 +17,17 @@ | |
cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) | ||
|
||
include(../../rapids_config.cmake) | ||
set(WHOLEGRAPH_VERSION "${RAPIDS_VERSION_MAJOR_MINOR}.00") | ||
|
||
include(FetchContent) | ||
|
||
FetchContent_Declare( | ||
rapids-cmake | ||
GIT_REPOSITORY https://github.com/rapidsai/rapids-cmake.git | ||
GIT_TAG origin/branch-${RAPIDS_VERSION_MAJOR_MINOR} | ||
) | ||
FetchContent_MakeAvailable(rapids-cmake) | ||
include(rapids-cmake) | ||
include(rapids-cuda) | ||
include(rapids-cpm) | ||
|
||
rapids_cuda_init_architectures(PYLIBWHOLEGRAPH) | ||
|
||
project(PYLIBWHOLEGRAPH VERSION ${WHOLEGRAPH_VERSION} LANGUAGES CXX CUDA) | ||
project( | ||
PYLIBWHOLEGRAPH | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're a little inconsistent about this across repos but it might be nice to use lowercase e.g. cuDF has There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, yeah I'd noticed that. Let's treat it as out-of-scope for this PR. I'd like to merge this to simplify things ahead of setting up The project name flows into a bunch of other variables that CMake generates (see https://cmake.org/cmake/help/latest/command/project.html#command:project) and I'm not sure if those are case-sensitive, so changing the case could require other changes to CMake code here (and maybe in other places that build wholegraph from source, like RAPIDS devcontainers). I'd rather not work through that right now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, all those downstream uses are case sensitive. At some point we may want to strive for consistency across RAPIDS but it’s low priority - lots of work, risk of breakage, and not a lot of value. |
||
VERSION "${RAPIDS_VERSION}" | ||
LANGUAGES CXX CUDA | ||
) | ||
|
||
############################################################################## | ||
# - User Options ------------------------------------------------------------ | ||
|
@@ -122,12 +116,6 @@ else() | |
"cmake prefix ${CMAKE_PREFIX_PATH} or user dir $ENV{LIBWHOLEGRAPH_DIR}") | ||
endif() | ||
|
||
execute_process( | ||
COMMAND "${Python_EXECUTABLE}" -c "import os; import skbuild; print(os.path.join(os.path.dirname(skbuild.__file__), 'resources/cmake'))" | ||
OUTPUT_VARIABLE SKBUILD_CMAKE_MODULE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
list(APPEND CMAKE_MODULE_PATH "${SKBUILD_CMAKE_MODULE_PATH}") | ||
|
||
include(rapids-cython-core) | ||
rapids_cython_init() | ||
|
||
|
@@ -142,15 +130,11 @@ message(VERBOSE "PYLIBWHOLEGRAPH: Enable detection of conda environment for depe | |
# this is needed for clang-tidy runs | ||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
list(APPEND CXX_DEFINITIONS WHOLEGRAPH_VERSION=${WHOLEGRAPH_VERSION}) | ||
|
||
message(STATUS "PYLIBWHOLEGRAPH: DEFAULT_CXX_FLAGS='${DEFAULT_CXX_FLAGS}'") | ||
message(STATUS "PYLIBWHOLEGRAPH: CXX_FLAGS='${CXX_FLAGS}'") | ||
message(STATUS "PYLIBWHOLEGRAPH: CXX_DEFINITIONS='${CXX_DEFINITIONS}'") | ||
|
||
############################################################################## | ||
# - Variables ---------------------------------------------------------------- | ||
|
||
set(WHOLEGRAPH_CPP_TARGET "wholegraph::wholegraph" CACHE STRING "libwholegraph target name") | ||
# - Cython modules ----------------------------------------------------------- | ||
|
||
add_subdirectory(pylibwholegraph/binding) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For re-use in
cpp/Doxyfile