The amdphdrs tool does not actually have a dependency on clang or hsa; the examples do. amdphdrs has a dependency on a valid CXX compiler and libelf.
Introducing a new CMAKE configure option 'BUILD_EXAMPLES' that encapsulates the examples and their dependencies. Setting to OFF (default ON) only builds the tool itself.
The amdphdrs tool does not actually have a dependency on clang or hsa; the examples do. amdphdrs has a dependency on a valid CXX compiler and libelf.
Introducing a new CMAKE configure option 'BUILD_EXAMPLES' that encapsulates the examples and their dependencies. Setting to OFF (default ON) only builds the tool itself.