Skip to content

Commit

Permalink
remove flake8, clang tools from wholegraph CMake (#103)
Browse files Browse the repository at this point in the history
`wholgraph`'s CMake has some configuration to run `flake8`, `clang-tidy`, and `clang-foramt` via CMake.

This proposes removing it.

## Notes for Reviewers

### Risks to doing this?

I don't think any.

`flake8` and `clang-format` configs are unnecessary, as those are already run via `pre-commit` here:

https://github.com/rapidsai/cugraph-gnn/blob/71675d868589ff9f904197f729985de1555cb914/.pre-commit-config.yaml#L22

https://github.com/rapidsai/cugraph-gnn/blob/71675d868589ff9f904197f729985de1555cb914/.pre-commit-config.yaml#L37

The `clang-tidy` support must not actually be used today... it refers to a script that doesn't exist in this repo:

https://github.com/rapidsai/cugraph-gnn/blob/71675d868589ff9f904197f729985de1555cb914/cpp/cmake/CodeChecker.cmake#L42-L43

This code had been in the `wholegraph` repo for a while... it was added in June 2023 (rapidsai/wholegraph#24) and then never modified again.

### Benefits of doing this?

Similar to #102, I'm putting up PRs like this because I'm planning to attempt to add `libwholegraph` wheels, and want to simplify the `wholegraph` / `pylibwholegraph` CMake as much as possible before doing that, to reduce the implementation and reviewing effort.

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - https://github.com/linhu-nv

URL: #103
  • Loading branch information
jameslamb authored Jan 7, 2025
1 parent 71675d8 commit bb81a18
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 75 deletions.
16 changes: 0 additions & 16 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -226,22 +226,6 @@ endif()
if (BUILD_BENCHMARKS AND CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
add_subdirectory(bench)
endif()
##############################################################################
# - code checker -------------------------------------------------------------

include(./cmake/CodeChecker.cmake)
set(CLANG_FORMAT_EXE "clang-format")
set(CLANG_TIDY_EXE "clang-tidy")
set(FLAKE8_EXE "flake8")
if(CLANG_TOOL_PATH)
set(CLANG_FORMAT_EXE ${CLANG_TOOL_PATH}/clang-format)
set(CLANG_TIDY_EXE ${CLANG_TOOL_PATH}/clang-tidy)
endif()
add_code_checks(
CWD ${PROJECT_SOURCE_DIR}
CLANG_FORMAT ${CLANG_FORMAT_EXE}
CLANG_TIDY ${CLANG_TIDY_EXE}
FLAKE8 ${FLAKE8_EXE})

##############################################################################
# - install targets ----------------------------------------------------------
Expand Down
56 changes: 0 additions & 56 deletions cpp/cmake/CodeChecker.cmake

This file was deleted.

3 changes: 0 additions & 3 deletions python/pylibwholegraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ message(VERBOSE "PYLIBWHOLEGRAPH: Enable detection of conda environment for depe
##############################################################################
# - Compiler options ---------------------------------------------------------

# this is needed for clang-tidy runs
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

message(STATUS "PYLIBWHOLEGRAPH: DEFAULT_CXX_FLAGS='${DEFAULT_CXX_FLAGS}'")
message(STATUS "PYLIBWHOLEGRAPH: CXX_FLAGS='${CXX_FLAGS}'")
message(STATUS "PYLIBWHOLEGRAPH: CXX_DEFINITIONS='${CXX_DEFINITIONS}'")
Expand Down

0 comments on commit bb81a18

Please sign in to comment.