Skip to content

Commit 3927d2f

Browse files
committed
check if CUDA is present in the case SOFACUDA is shipped
1 parent 1ee2953 commit 3927d2f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ sofa_find_package(Sofa.Component.Constraint.Projective REQUIRED)
1414
sofa_find_package(Sofa.Component.Constraint.Lagrangian REQUIRED)
1515
sofa_find_package(SofaImplicitField QUIET)
1616
sofa_find_package(SofaAdvancedConstraint QUIET)
17-
sofa_find_package(SofaCUDA QUIET)
17+
18+
find_package(CUDAToolkit QUIET) # necessary if the shipped SOFA has CUDA but the current setup does not
19+
if(CUDAToolkit_FOUND)
20+
sofa_find_package(SofaCUDA QUIET)
21+
endif()
1822

1923
set(BEAMADAPTER_SRC "src/${PROJECT_NAME}")
2024

0 commit comments

Comments
 (0)