b41a769517
1.Make directed_test apps linked against static libs of hip, rocclr, rocr, roct and amd_comgr. 2.Remove custom_target amdhip64_static_combiner. 3.Support EXCLUDE_HIP_LIB_TYPE <static|shared>. 4.Simplify argument list parsing. 5.Fix hip_pch.o missing issue in samples' build. 6.Fix some original small bugs. Change-Id: I30f5e65367613152ce86b80b13e1c9f2a28da803
28 líneas
629 B
CMake
28 líneas
629 B
CMake
project(bit_extract)
|
|
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
if(NOT DEFINED __HIP_ENABLE_PCH)
|
|
set(__HIP_ENABLE_PCH ON CACHE BOOL "enable/disable pre-compiled hip headers")
|
|
endif()
|
|
|
|
if(${__HIP_ENABLE_PCH})
|
|
add_definitions(-D__HIP_ENABLE_PCH)
|
|
endif()
|
|
|
|
# Search for rocm in common locations
|
|
list(APPEND CMAKE_PREFIX_PATH /opt/rocm/hip /opt/rocm)
|
|
|
|
# Find hip
|
|
find_package(hip)
|
|
|
|
# Set compiler and linker
|
|
set(CMAKE_CXX_COMPILER ${HIP_HIPCC_EXECUTABLE})
|
|
|
|
set(CMAKE_CXX_LINKER ${HIP_HIPCC_EXECUTABLE})
|
|
|
|
# Create the excutable
|
|
add_executable(bit_extract bit_extract.cpp)
|
|
|
|
# Link with HIP
|
|
target_link_libraries(bit_extract hip::host) |