Skip to content

Commit

Permalink
Adapt to location of rocprofiler.h in ROCm 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chesik-amd committed Feb 8, 2019
1 parent 9d8c88b commit a758647
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions CMakeModules/GPA-HSA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@ if(${GPA_ALL_OPEN_SOURCE})
"/opt/rocm/hsa/include/hsa")
endif()

# ROCm path
find_file(ROCM_PATH "rocprofiler.h"
HINTS "/opt/rocm/include"
# ROCProfiler header
find_file(ROCP_HEADER "rocprofiler.h"
HINTS "/opt/rocm/include/rocprofiler" "/opt/rocm/include"
NO_DEFAULT_PATH)
if(${ROCM_PATH} STREQUAL "ROCM_PATH-NOTFOUND")
message("CMake: ROCm Profiler not found")
if(${ROCP_HEADER} STREQUAL "ROCP_HEADER-NOTFOUND")
message("CMake: ROCm Profiler header not found")
else()
get_filename_component(ROCP_PATH ${ROCP_HEADER} DIRECTORY)
set(ADDITIONAL_INCLUDE_DIRECTORIES ${ADDITIONAL_INCLUDE_DIRECTORIES}
"/opt/rocm/include")
${ROCP_PATH})
endif()
endif()
else()
include(${CMAKE_COMMON_LIB_GLOBAL_AMD_HSA_NO_LIB})
endif()
endif()

0 comments on commit a758647

Please sign in to comment.