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

Change-Id: If22e7e96604f184458cc6ab6bb9945152f9359e0
This commit is contained in:
Rahul Manocha committed 2023-12-05 11:36:15 -05:00
1 parent 4a60fe5fd1
commit 7481de706f
33 files changed
+461 -89

No files matched your search

+10 -1
View File
@@ -52,7 +52,12 @@ set(CMAKE_CXX_LINKER ${HIP_HIPCC_EXECUTABLE})
set(CMAKE_BUILD_TYPE Release)
# Create the excutable
add_executable(hipInfo hipInfo.cpp)
if(TARGET build_utils)
set(EXCLUDE_OPTION EXCLUDE_FROM_ALL)
else()
set(EXCLUDE_OPTION )
endif()
add_executable(hipInfo ${EXCLUDE_OPTION} hipInfo.cpp)
# Link with HIP
target_link_libraries(hipInfo hip::host)
@@ -65,3 +70,7 @@ target_include_directories(hipInfo PRIVATE ../../common)
if (WIN32 AND HIPINFO_INTERNAL_BUILD)
install(FILES ${PROJECT_BINARY_DIR}/hipInfo.exe DESTINATION .)
endif()
if(TARGET build_utils)
add_dependencies(build_utils hipInfo)
endif()