[SWDEV-431345][SWDEV-432633] toplevel cmake for hip samples

Change-Id: If22e7e96604f184458cc6ab6bb9945152f9359e0


[ROCm/hip-tests commit: 7481de706f]
This commit is contained in:
Rahul Manocha
2023-11-13 19:12:54 +00:00
parent 6259d20646
commit b821fdbfba
33 changed files with 461 additions and 89 deletions
@@ -37,7 +37,16 @@ set(CMAKE_CXX_COMPILER ${HIP_HIPCC_EXECUTABLE})
set(CMAKE_CXX_LINKER ${HIP_HIPCC_EXECUTABLE})
# Create the excutable
add_executable(peer2peer peer2peer.cpp)
if(TARGET build_cookbook)
set(EXCLUDE_OPTION EXCLUDE_FROM_ALL)
else()
set(EXCLUDE_OPTION )
endif()
add_executable(peer2peer ${EXCLUDE_OPTION} peer2peer.cpp)
# Link with HIP
target_link_libraries(peer2peer hip::host)
if(TARGET build_cookbook)
add_dependencies(build_cookbook peer2peer)
endif()