Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 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
35 changes: 35 additions & 0 deletions .github/workflows/cmakelint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Run cmakelint over all the repo's CMake files
name: cmakelint
on:
pull_request:
paths:
- '**.cmake'
- 'CMakeLists.txt'
permissions:
contents: read
jobs:
cmake-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 #v4.1.7

- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0

- name: Set up cmakelint
run: |
python -m pip install --upgrade pip
python -m pip install cmakelint

- name: Lint all CMake files
run: |
FILES=$(find . -type f \( -name "CMakeLists.txt" -o -name "*.cmake" \))
if [ -z "$FILES" ]; then
echo "No CMake files found!"
exit 1
fi
echo "Linting the following files:"
echo "$FILES"
cmakelint $FILES
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command cmakelint $FILES will fail if any file paths contain spaces because FILES is not quoted. This causes word splitting. Use cmakelint $FILES with proper quoting or pass files via xargs to handle paths with spaces correctly.

Suggested change
cmakelint $FILES
# Use find -print0 and xargs -0 to handle file paths with spaces
find . -type f \( -name "CMakeLists.txt" -o -name "*.cmake" \) -print0 | xargs -0 cmakelint

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No


4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ else()
message(NOTICE "find_package did NOT find hip")
endif()

# Find the CUfile library and headers on NVIDIA
# Find the cuFile library and headers on NVIDIA
if(CMAKE_HIP_PLATFORM STREQUAL "nvidia")
find_package(CUDAToolkit REQUIRED)

Expand All @@ -210,7 +210,7 @@ if(CMAKE_HIP_PLATFORM STREQUAL "nvidia")
find_library(CUFILE_LIBRARY cufile PATHS ${CUDAToolkit_LIBRARY_DIR})

if(NOT CUFILE_LIBRARY)
message(FATAL_ERROR "CUfile library not found")
message(FATAL_ERROR "cuFile library not found")
endif()
endif()

Expand Down
Loading