Skip to content

Commit 2334c76

Browse files
committed
avoid using CUDA_HOME for cuda only build
1 parent 31f965e commit 2334c76

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cmake/device.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ target_link_libraries (all.tests
4242
)
4343

4444

45-
set_property (TARGET tinker9 all.tests
46-
APPEND_STRING PROPERTY
47-
LINK_FLAGS " CUDA_HOME=${CUDA_DIR}"
48-
)
45+
if (GPU_LANG STREQUAL "OPENACC")
46+
set_property (TARGET tinker9 all.tests
47+
APPEND_STRING PROPERTY
48+
LINK_FLAGS " CUDA_HOME=${CUDA_DIR}"
49+
)
50+
endif ()
4951

5052

5153
if (${CMAKE_SYSTEM_NAME} STREQUAL Darwin)

0 commit comments

Comments
 (0)