bcd067f462
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.Install rocclr when rocm is installed.
6.Fix some original small bugs.
Revert "Revert "Make directed_test support static libs""
This reverts commit 5b7533e49f.
Change-Id: I918eeae94487e5e2ff5bfde083667ac65fb6e702
28 lines
629 B
CMake
28 lines
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) |