SWDEV-437189 - Provide option to enable/disable CPACK_SET_DESTDIR
The variable is set as cache, so that user can override. But the hard coded setting is preventing override. Removed the same Change-Id: Ica5f9074a6532f465705a8dd1a8f21c6643ef49e
This commit is contained in:
@@ -17,6 +17,10 @@ endif()
|
||||
# flag to generate standalone exe per src file.
|
||||
message(STATUS "STANDALONE_TESTS : ${STANDALONE_TESTS}")
|
||||
|
||||
if(NOT WIN32)
|
||||
set(CPACK_SET_DESTDIR ON CACHE BOOL "Installer package will install hip catch to CMAKE_INSTALL_PREFIX instead of CPACK_PACKAGING_INSTALL_PREFIX")
|
||||
endif()
|
||||
|
||||
# Check if platform is set
|
||||
if(NOT HIP_PLATFORM STREQUAL "amd" AND NOT HIP_PLATFORM STREQUAL "nvidia")
|
||||
message(FATAL_ERROR "Unexpected HIP_PLATFORM: " ${HIP_PLATFORM})
|
||||
|
||||
@@ -30,7 +30,6 @@ include(GNUInstallDirs)
|
||||
#############################
|
||||
# Packaging steps
|
||||
#############################
|
||||
set(CPACK_SET_DESTDIR TRUE)
|
||||
if(NOT DEFINED CPACK_INSTALL_PREFIX)
|
||||
set(CPACK_INSTALL_PREFIX "/opt/rocm/")
|
||||
endif()
|
||||
|
||||
@@ -24,6 +24,9 @@ project(hip-samples)
|
||||
option(ENABLE_ADDRESS_SANITIZER "Option to enable ASAN build" OFF)
|
||||
option(BUILD_SHARED_LIBS "Use this option to link with shared hip runtime libraries" ON)
|
||||
|
||||
if(NOT WIN32)
|
||||
set(CPACK_SET_DESTDIR ON CACHE BOOL "Installer package will install hip-samples to CMAKE_INSTALL_PREFIX instead of CPACK_PACKAGING_INSTALL_PREFIX")
|
||||
endif()
|
||||
# Read -DROCM_Path and env{ROCM_PATH}
|
||||
if(NOT DEFINED ROCM_PATH)
|
||||
if(DEFINED ENV{ROCM_PATH})
|
||||
|
||||
@@ -32,7 +32,6 @@ include(GNUInstallDirs)
|
||||
#############################
|
||||
# Packaging steps
|
||||
#############################
|
||||
set(CPACK_SET_DESTDIR TRUE)
|
||||
if(NOT DEFINED CPACK_INSTALL_PREFIX)
|
||||
set(CPACK_INSTALL_PREFIX "/opt/rocm/")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user