This issue was found by a Codex global scan of the repository at commit 19f9265.
The project declares CMake 3.15 as sufficient:
|
cmake_minimum_required(VERSION 3.15) |
|
project(deepmd-gnn CXX) |
The CUDA build path uses newer CMake features, including FindCUDAToolkit, CUDA language/runtime properties, and COMMAND_ERROR_IS_FATAL in the dynamic cudart stub generation path:
|
if(DEEPMD_GNN_WITH_CUDA STREQUAL "ON") |
|
find_package(CUDAToolkit REQUIRED) |
|
elseif(DEEPMD_GNN_WITH_CUDA STREQUAL "AUTO") |
|
find_package(CUDAToolkit QUIET) |
|
if(NOT DEFINED CMAKE_CUDA_COMPILER) |
|
set(CMAKE_CUDA_COMPILER ${DEEPMD_GNN_NVCC_EXECUTABLE}) |
|
endif() |
|
if(NOT DEFINED CMAKE_CUDA_HOST_COMPILER) |
|
set(CMAKE_CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER}) |
|
endif() |
|
enable_language(CUDA) |
|
if(DEEPMD_GNN_ENABLE_CUDA) |
|
target_compile_definitions(deepmd_gnn PRIVATE DEEPMD_GNN_WITH_CUDA) |
|
set_target_properties(deepmd_gnn PROPERTIES CUDA_STANDARD 17) |
|
if(TARGET deepmd_gnn_cudart) |
|
set_target_properties(deepmd_gnn PROPERTIES CUDA_RUNTIME_LIBRARY None) |
|
target_link_libraries(deepmd_gnn PRIVATE deepmd_gnn_cudart ${CMAKE_DL_LIBS}) |
|
endif() |
|
execute_process( |
|
COMMAND |
|
${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/third_party/implib/implib-gen.py |
|
${CUDART_LOCATION} --target ${CMAKE_SYSTEM_PROCESSOR} --dlopen-callback |
|
DPGNN_cudart_dlopen --dlsym-callback DPGNN_cudart_dlsym |
|
COMMAND_ERROR_IS_FATAL ANY |
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) |
Users with an accepted-but-too-old CMake can hit confusing configure failures, especially when DEEPMD_GNN_WITH_CUDA=ON or dynamic cudart is enabled.
Suggested fix: raise cmake_minimum_required() to the real minimum needed by the CUDA/dynamic-cudart path, or gate/replace the newer commands for older CMake versions. At minimum, fail early with a clear diagnostic when those paths are requested.
This issue was found by a Codex global scan of the repository at commit 19f9265.
The project declares CMake 3.15 as sufficient:
deepmd-gnn/CMakeLists.txt
Lines 1 to 2 in 19f9265
The CUDA build path uses newer CMake features, including
FindCUDAToolkit, CUDA language/runtime properties, andCOMMAND_ERROR_IS_FATALin the dynamic cudart stub generation path:deepmd-gnn/CMakeLists.txt
Lines 38 to 41 in 19f9265
deepmd-gnn/CMakeLists.txt
Lines 73 to 79 in 19f9265
deepmd-gnn/op/CMakeLists.txt
Lines 24 to 30 in 19f9265
deepmd-gnn/op/cudart/CMakeLists.txt
Lines 12 to 18 in 19f9265
Users with an accepted-but-too-old CMake can hit confusing configure failures, especially when
DEEPMD_GNN_WITH_CUDA=ONor dynamic cudart is enabled.Suggested fix: raise
cmake_minimum_required()to the real minimum needed by the CUDA/dynamic-cudart path, or gate/replace the newer commands for older CMake versions. At minimum, fail early with a clear diagnostic when those paths are requested.