Skip to content

Commit

Permalink
ROCtracer: Include as System library
Browse files Browse the repository at this point in the history
Because of GNU extensions in the roctracer include files for the legacy include.
But we should make this `-isystem` anyway to be robust for the future.

The 5.2 deprecated include file `<roctracer_ext.h>` throws warnings
because they rely on GNU extensions:
```
In file included from /opt/rocm/hip/../roctracer/include/ext/prof_protocol.h:27:
/opt/rocm/hip/../roctracer/include/ext/../../../include/roctracer/ext/prof_protocol.h:70:7: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct]
      struct {
      ^
/opt/rocm/hip/../roctracer/include/ext/../../../include/roctracer/ext/prof_protocol.h:70:7: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
/opt/rocm/hip/../roctracer/include/ext/../../../include/roctracer/ext/prof_protocol.h:75:7: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
      struct {
      ^
/opt/rocm/hip/../roctracer/include/ext/../../../include/roctracer/ext/prof_protocol.h:82:7: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct]
      struct {
      ^
/opt/rocm/hip/../roctracer/include/ext/../../../include/roctracer/ext/prof_protocol.h:86:7: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct]
      struct {
      ^
/opt/rocm/hip/../roctracer/include/ext/../../../include/roctracer/ext/prof_protocol.h:90:7: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct]
      struct {
      ^
/opt/rocm/hip/../roctracer/include/ext/../../../include/roctracer/ext/prof_protocol.h:82:7: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
      struct {
      ^
/opt/rocm/hip/../roctracer/include/ext/../../../include/roctracer/ext/prof_protocol.h:86:7: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
      struct {
      ^
/opt/rocm/hip/../roctracer/include/ext/../../../include/roctracer/ext/prof_protocol.h:90:7: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
      struct {
      ^
```
  • Loading branch information
ax3l committed Sep 14, 2022
1 parent 36f24ea commit 6f667c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tools/CMake/AMReXParallelBackends.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ if (AMReX_HIP)
if(AMReX_ROCTX)
# To be modernized in the future, please see:
# https://github.com/ROCm-Developer-Tools/roctracer/issues/56
target_include_directories(amrex PUBLIC ${HIP_PATH}/../roctracer/include ${HIP_PATH}/../rocprofiler/include)
target_include_directories(amrex SYSTEM PUBLIC ${HIP_PATH}/../roctracer/include ${HIP_PATH}/../rocprofiler/include)
target_link_libraries(amrex PUBLIC "-L${HIP_PATH}/../roctracer/lib/ -lroctracer64" "-L${HIP_PATH}/../roctracer/lib -lroctx64")
endif ()
target_link_libraries(amrex PUBLIC hip::hiprand roc::rocrand roc::rocprim)
Expand Down

0 comments on commit 6f667c7

Please sign in to comment.