Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Remove redundant and hard coded path from install interface (#57)
Browse files Browse the repository at this point in the history
* Remove redundant and hard coded path from install interface

Opencl header files are installed in /opt/rocm-ver/include/CL
Including CMAKE_INSTALL_INCLUDEDIR will help to find the opencl header files
OPENCL_INCLUDE_DIRS is coming as hard coded path in config file and having hard coded paths in config files is not recommended

* Comments updated for readability
  • Loading branch information
raramakr authored Aug 2, 2022
1 parent a76133e commit 3a0038c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions miopengemm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ if(NOT WIN32 AND NOT APPLE)
endif()

target_include_directories (miopengemm PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/dev_include>)
target_include_directories (miopengemm SYSTEM PUBLIC
# Opencl headers installed in cmake install includedir and INTERFACE_INCLUDE_DIRECTORIES have that path
# OPENCL_INCLUDE_DIRS is redundant and not required in install interface.
# Required for building, so limiting it to build interface
target_include_directories (miopengemm SYSTEM PUBLIC

${OPENCL_INCLUDE_DIRS}
$<BUILD_INTERFACE:${OPENCL_INCLUDE_DIRS}>
${CLBLAST_INCLUDE_DIR}
${ISAAC_INCLUDE_DIR}
${OpenBLAS_INCLUDE_DIR}
Expand All @@ -57,7 +60,7 @@ endif()

rocm_install_targets(
TARGETS miopengemm
INCLUDE
INCLUDE
${CMAKE_CURRENT_SOURCE_DIR}/include
)

Expand Down

0 comments on commit 3a0038c

Please sign in to comment.