1065f6333d
JIRA : SWDEV-234471
With this change compilation of the ibamdhip64 to be decied by arguments to build_hip_on_rocclr.sh file
build_hip_on_rocclr.sh -r (current) shall conitnue to create libamdhip64.so;
build_hip_on_rocclr.sh -r a (new) shall create libamdhip64.a
other options remain the same
Changed the targets according to requirement of stage2 dependencies.
Changed find_lib with find_package
Adpated the review comments
Change-Id: I719918f73ab33cd8031a32db6fe9b8adaa1b4b87
[ROCm/hip commit: ab88cbbb8a]
38 righe
1.3 KiB
CMake
38 righe
1.3 KiB
CMake
#-------------------------------------LPL--------------------------------------#
|
|
add_executable(lpl lpl.cpp)
|
|
set_target_properties(
|
|
lpl PROPERTIES
|
|
CXX_STANDARD 11
|
|
CXX_STANDARD_REQUIRED ON
|
|
CXX_EXTENSIONS OFF
|
|
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
|
target_include_directories(lpl PUBLIC ${PROJECT_SOURCE_DIR}/src)
|
|
target_compile_options(lpl PUBLIC -Wall)
|
|
target_link_libraries(lpl PUBLIC pthread)
|
|
|
|
install(TARGETS lpl RUNTIME DESTINATION bin)
|
|
#-------------------------------------LPL--------------------------------------#
|
|
|
|
#-------------------------------------CA---------------------------------------#
|
|
add_executable(ca ca.cpp)
|
|
set_target_properties(
|
|
ca PROPERTIES
|
|
CXX_STANDARD 11
|
|
CXX_STANDARD_REQUIRED ON
|
|
CXX_EXTENSIONS OFF
|
|
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
|
target_include_directories(ca SYSTEM PUBLIC ${HSA_PATH}/include)
|
|
target_include_directories(ca PUBLIC ${PROJECT_SOURCE_DIR}/src)
|
|
|
|
find_package(hsa-runtime64 REQUIRED CONFIG
|
|
PATHS
|
|
/opt/rocm/
|
|
PATH_SUFFIXES
|
|
cmake/hsa-runtime64)
|
|
|
|
target_link_libraries(ca PUBLIC hsa-runtime64::hsa-runtime64 )
|
|
target_compile_options(ca PUBLIC -DDISABLE_REDUCED_GPU_BLOB_COPY -Wall)
|
|
|
|
install(TARGETS ca RUNTIME DESTINATION bin)
|
|
#-------------------------------------CA---------------------------------------#
|