Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put saveguard to avoid defining target more than once #125

Open
wants to merge 1 commit into
base: amd-staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hipamd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ configure_package_config_file(
)

configure_package_config_file(
hip-config-nvidia.cmake
hip-config-nvidia.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/hip-config-nvidia.cmake
INSTALL_DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR}
PATH_VARS LIB_INSTALL_DIR INCLUDE_INSTALL_DIR BIN_INSTALL_DIR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

add_library(hip::device INTERFACE IMPORTED)
add_library(hip::host INTERFACE IMPORTED)
add_library(hip::amdhip64 INTERFACE IMPORTED)
foreach(__lib device host amdhip64)
if (NOT TARGET hip::${__lib})
add_library(hip::${__lib} INTERFACE IMPORTED)
set_target_properties(hip::${__lib} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES @PACKAGE_INCLUDE_INSTALL_DIR@
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES @PACKAGE_INCLUDE_INSTALL_DIR@)
endif()
endforeach()