Skip to content

Commit

Permalink
COMP: Ensure Autoscoper inner-build is built with expected CUDA toolkit
Browse files Browse the repository at this point in the history
If the main project has been configured specifying the variable
CUDA_TOOLKIT_ROOT_DIR, this propagates the variable to the inner-build.
  • Loading branch information
jcfr committed Dec 15, 2023
1 parent ae29f87 commit 6444737
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ if(UNIX AND NOT APPLE)
message(STATUS "Setting OpenGL_GL_PREFERENCE to ${OpenGL_GL_PREFERENCE}")
endif()

if(Autoscoper_RENDERING_BACKEND STREQUAL "CUDA")
# Variable expected by find_package(CUDA)
if(DEFINED CUDA_TOOLKIT_ROOT_DIR)
mark_as_superbuild(CUDA_TOOLKIT_ROOT_DIR:PATH)
endif()
endif()

if(Autoscoper_RENDERING_BACKEND STREQUAL "OpenCL")
set(Autoscoper_OpenCL_MINIMUM_REQUIRED_VERSION "1.2.0")
mark_as_superbuild(Autoscoper_OpenCL_MINIMUM_REQUIRED_VERSION:STRING)
Expand Down

0 comments on commit 6444737

Please sign in to comment.