Skip to content

Commit b2fdb19

Browse files
iassiourrakesroy
authored andcommitted
SWDEV-478295 - Link with hiprtc-builtins for sample 23_cmake_hiprtc in static build
Change-Id: I9ccc1310ea2f38d8624103e198b6fc1077712345
1 parent b41991f commit b2fdb19

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

samples/2_Cookbook/23_cmake_hiprtc/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ endif()
4646
add_executable(test ${EXCLUDE_OPTION} saxpy.cpp)
4747

4848
# Link with HIPRTC
49-
target_link_libraries(test hiprtc::hiprtc)
49+
target_link_libraries(test hiprtc)
5050
# Link with HIP
5151
target_link_libraries(test hip::device)
5252

53+
if(NOT BUILD_SHARED_LIBS)
54+
target_link_libraries(test hiprtc-builtins)
55+
endif()
56+
5357
target_include_directories(test PRIVATE ../../common)
5458

5559
if(TARGET build_cookbook)

0 commit comments

Comments
 (0)