Skip to content

Commit 45114e5

Browse files
committed
fix
1 parent 3f7d256 commit 45114e5

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

CMakeLists.txt

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,37 +22,6 @@ include(external)
2222

2323
find_package(Threads REQUIRED)
2424

25-
# ---------------------------------------------------------------------------
26-
# CUDA Toolkit (optional) — needed for HAS_CUDA tests
27-
# ---------------------------------------------------------------------------
28-
# Prefer auto-detection; if it fails, fall back to CUDA_TOOLKIT_ROOT cache var.
29-
set(CUDA_TOOLKIT_ROOT
30-
""
31-
CACHE PATH "Path to CUDA toolkit root (e.g. /home/aistudio/cuda-11.8). \
32-
Leave empty to let CMake auto-detect.")
33-
34-
if(CUDA_TOOLKIT_ROOT)
35-
set(CUDAToolkit_ROOT "${CUDA_TOOLKIT_ROOT}")
36-
endif()
37-
38-
find_package(CUDAToolkit QUIET)
39-
40-
if(CUDAToolkit_FOUND)
41-
message(STATUS "CUDA Toolkit ${CUDAToolkit_VERSION} found: \
42-
${CUDAToolkit_INCLUDE_DIRS}")
43-
include_directories(${CUDAToolkit_INCLUDE_DIRS})
44-
else()
45-
# Last-resort: accept a bare include path supplied by the user
46-
if(CUDA_TOOLKIT_ROOT AND EXISTS "${CUDA_TOOLKIT_ROOT}/include/cuda.h")
47-
message(STATUS "CUDA headers found via CUDA_TOOLKIT_ROOT: \
48-
${CUDA_TOOLKIT_ROOT}/include")
49-
include_directories("${CUDA_TOOLKIT_ROOT}/include")
50-
else()
51-
message(STATUS "CUDA Toolkit not found — CUDA tests will be skipped. \
52-
Set -DCUDA_TOOLKIT_ROOT=/home/aistudio/cuda-11.8 to enable them.")
53-
endif()
54-
endif()
55-
5625
set(EXE_TARGET_NAME "all_api_tests")
5726
if(CMAKE_COMPILER_IS_GNUCXX)
5827
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -ansi -Wno-deprecated")

0 commit comments

Comments
 (0)