Skip to content

Commit

Permalink
Remove RPATH/RUNPATH - Adding SKIP RPATH flag (ROCm#995)
Browse files Browse the repository at this point in the history
* Adding SKIP RPATH flag

* Update Review Comments-SKIP_RPATH replaced with SKIP_INSTALL_RPATH, disable use_link_path

* Review Comments Updated
  • Loading branch information
arvindcheru authored and kiritigowda committed Dec 1, 2022
1 parent 1d0c88e commit a5a4948
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 7 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ set(ROCM_PATH /opt/rocm CACHE PATH "Default ROCm installation path")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${ROCM_PATH} CACHE PATH "MIVisionX default installation path" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Changes for RPATH Removal from Binaries:
# Since all public interface libraries are present in same folder
# RPATH/RUNPATH is not required
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
set(CMAKE_SKIP_INSTALL_RPATH TRUE)

# MIVisionX Default Options
option(ENHANCED_MESSAGE "MIVisionX Enhanced Message Option" ON)
Expand Down
7 changes: 6 additions & 1 deletion amd_openvx_extensions/amd_custom/custom_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ set(ROCM_PATH /opt/rocm CACHE PATH "Default ROCm installation path")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${ROCM_PATH} CACHE PATH "MIVisionX default installation path" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Changes for RPATH Removal from Binaries:
# Since all public interface libraries are present in same folder
# RPATH/RUNPATH is not required
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
set(CMAKE_SKIP_INSTALL_RPATH TRUE)

# Add Default libdir
set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory")
Expand Down
7 changes: 6 additions & 1 deletion apps/cloud_inference/server_app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ set(ROCM_PATH /opt/rocm CACHE PATH "Default ROCm installation path")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${ROCM_PATH} CACHE PATH "MIVisionX default installation path" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Changes for RPATH Removal from Binaries:
# Since all public interface libraries are present in same folder
# RPATH/RUNPATH is not required
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
set(CMAKE_SKIP_INSTALL_RPATH TRUE)

# Add Default libdir
set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory")
Expand Down
7 changes: 6 additions & 1 deletion apps/dg_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ set(ROCM_PATH /opt/rocm CACHE PATH "Default ROCm installation path")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${ROCM_PATH} CACHE PATH "MIVisionX default installation path" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Changes for RPATH Removal from Binaries:
# Since all public interface libraries are present in same folder
# RPATH/RUNPATH is not required
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
set(CMAKE_SKIP_INSTALL_RPATH TRUE)

# Add Default libdir
set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory")
Expand Down
7 changes: 6 additions & 1 deletion apps/image_augmentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ set(ROCM_PATH /opt/rocm CACHE PATH "Default ROCm installation path")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${ROCM_PATH} CACHE PATH "MIVisionX default installation path" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Changes for RPATH Removal from Binaries:
# Since all public interface libraries are present in same folder
# RPATH/RUNPATH is not required
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
set(CMAKE_SKIP_INSTALL_RPATH TRUE)

# Add Default libdir
set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory")
Expand Down
7 changes: 6 additions & 1 deletion apps/mivisionx_openvx_classifier/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ set(ROCM_PATH /opt/rocm CACHE PATH "Default ROCm installation path")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${ROCM_PATH} CACHE PATH "MIVisionX default installation path" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Changes for RPATH Removal from Binaries:
# Since all public interface libraries are present in same folder
# RPATH/RUNPATH is not required
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
set(CMAKE_SKIP_INSTALL_RPATH TRUE)

# Add Default libdir
set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory")
Expand Down
7 changes: 6 additions & 1 deletion model_compiler/python/nnir_to_clib.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ def generateCMakeFiles(graph,outputFolder):
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${ROCM_PATH} CACHE PATH "mivisionx default installation path" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# Changes for RPATH Removal from Binaries:
# Since all public interface libraries are present in same folder
# RPATH/RUNPATH is not required
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
set(CMAKE_SKIP_INSTALL_RPATH TRUE)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
Expand Down

0 comments on commit a5a4948

Please sign in to comment.