ROCMOPS-1956 - Push restructured code to hipamd
hipamd will have AMD's ROCCLR based HIP backend implementation Change-Id: Id7de9634519b4ce46fca71a1b61f3d5b1e3fc459
Tá an tiomantas seo le fáil i:
@@ -1,77 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2016-2021 Advanced Micro Devices, Inc. All Rights Reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
function die {
|
||||
echo "${1-Died}." >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
function cleanup {
|
||||
rm -rf "$workdir"
|
||||
}
|
||||
|
||||
# parse arguments
|
||||
hip_srcdir=$1
|
||||
html_destdir=$2
|
||||
[ "$hip_srcdir" != "" ] || [ "$html_destdir" != "" ] || die "Invalid arguments!"
|
||||
|
||||
# create temporary directory for grip settings
|
||||
workdir=`mktemp -d`
|
||||
trap cleanup EXIT
|
||||
|
||||
# setup grip
|
||||
export GRIPURL=$hip_srcdir
|
||||
export GRIPHOME=$workdir
|
||||
echo "CACHE_DIRECTORY = '$html_destdir/asset'" > $workdir/settings.py
|
||||
mkdir -p $html_destdir $html_destdir/docs/markdown
|
||||
|
||||
# convert all md files to html
|
||||
pushd $hip_srcdir
|
||||
for f in *.md docs/markdown/*.md; do grip --export --no-inline $f $html_destdir/${f%.*}.html; done
|
||||
popd
|
||||
|
||||
# convert absolute links to relative links
|
||||
pushd $html_destdir
|
||||
for f in *.html; do sed -i "s?$GRIPURL/??g" $f; done
|
||||
for f in docs/markdown/*.html; do sed -i "s?$GRIPURL/?../../?g" $f; done
|
||||
popd
|
||||
|
||||
# update document titles
|
||||
pushd $html_destdir
|
||||
for f in *.html; do sed -i "s?.md - Grip??g" $f; done
|
||||
for f in docs/markdown/*.html; do sed -i "s?.md - Grip??g" $f; done
|
||||
popd
|
||||
|
||||
# replace .md with .html in links
|
||||
pushd $html_destdir
|
||||
for f in *.html; do sed -i "s?.md\"?.html\"?g" $f; done
|
||||
for f in *.html; do sed -i "s?.md#?.html#?g" $f; done
|
||||
for f in docs/markdown/*.html; do sed -i "s?.md\"?.html\"?g" $f; done
|
||||
for f in docs/markdown/*.html; do sed -i "s?.md#?.html#?g" $f; done
|
||||
popd
|
||||
|
||||
# replace github.io links
|
||||
pushd $html_destdir
|
||||
sed -i "s?http://rocm-developer-tools.github.io/HIP?docs/RuntimeAPI/html/index.html?g" README.html
|
||||
sed -i "s?http://rocm-developer-tools.github.io/HIP?docs/RuntimeAPI/html/?g" RELEASE.html
|
||||
popd
|
||||
|
||||
exit 0
|
||||
@@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2016-2021 Advanced Micro Devices, Inc. All Rights Reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
ROCMDIR=@ROCM_PATH@
|
||||
HIPDIR=$ROCMDIR/hip
|
||||
|
||||
# Soft-link to bin files
|
||||
HIPBINFILES=$HIPDIR/bin/*
|
||||
ROCMBINDIR=$ROCMDIR/bin
|
||||
mkdir -p $ROCMBINDIR
|
||||
CURRENTDIR=`pwd`
|
||||
cd $ROCMBINDIR
|
||||
for f in $HIPBINFILES
|
||||
do
|
||||
ln -r -s -f $f $(basename $f)
|
||||
done
|
||||
ln -r -s -f $HIPDIR/bin/.hipVersion .hipVersion
|
||||
cd $CURRENTDIR
|
||||
|
||||
# Soft-link to headers
|
||||
HIPINCDIR=$HIPDIR/include/hip
|
||||
ROCMINCDIR=$ROCMDIR/include
|
||||
mkdir -p $ROCMINCDIR
|
||||
cd $ROCMINCDIR
|
||||
ln -r -s -f $HIPINCDIR hip
|
||||
cd $CURRENTDIR
|
||||
|
||||
# The following will be removed after upstream updation
|
||||
cd $HIPINCDIR
|
||||
ln -r -s -f amd_detail hcc_detail
|
||||
cd $CURRENTDIR
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2021 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
ROCMDIR=@ROCM_PATH@
|
||||
HIPDIR=$ROCMDIR/hip
|
||||
([ ! -d $ROCMDIR ] || [ ! -d $HIPDIR ]) && exit 0
|
||||
|
||||
# Remove soft-link to bin files
|
||||
HIPBINDIR=$HIPDIR/bin
|
||||
ROCMBINDIR=$ROCMDIR/bin
|
||||
([ ! -d $ROCMBINDIR ] || [ ! -d $HIPBINDIR ]) && exit 0
|
||||
HIPBINFILES=$HIPBINDIR/*
|
||||
CURRENTDIR=`pwd`
|
||||
cd $ROCMBINDIR
|
||||
for f in $HIPBINFILES; do
|
||||
[ -e $f ] || continue
|
||||
rm $(basename $f)
|
||||
done
|
||||
rm .hipVersion
|
||||
cd $CURRENTDIR
|
||||
rmdir --ignore-fail-on-non-empty $ROCMBINDIR
|
||||
|
||||
# Remove soft-link to headers
|
||||
HIPINCDIR=$HIPDIR/include
|
||||
cd $HIPINCDIR/hip
|
||||
rm hcc_detail
|
||||
cd $CURRENTDIR
|
||||
|
||||
ROCMINCDIR=$ROCMDIR/include
|
||||
([ ! -d $ROCMINCDIR ] || [ ! -d $HIPINCDIR ]) && exit 0
|
||||
cd $ROCMINCDIR
|
||||
rm hip
|
||||
cd $CURRENTDIR
|
||||
rmdir --ignore-fail-on-non-empty $ROCMINCDIR
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
# Copyright (c) 2016-2021 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(hip_base)
|
||||
|
||||
install(DIRECTORY @hip_SOURCE_DIR@/bin DESTINATION . USE_SOURCE_PERMISSIONS)
|
||||
# The following 'ATTERN "hcc_detail" EXCLUDE' will be removed after upstream updation
|
||||
install(DIRECTORY @hip_SOURCE_DIR@/include DESTINATION . PATTERN "hcc_detail" EXCLUDE)
|
||||
install(FILES @PROJECT_BINARY_DIR@/include/hip/amd_detail/hip_prof_str.h
|
||||
DESTINATION include/hip/amd_detail)
|
||||
install(FILES @PROJECT_BINARY_DIR@/include/hip/hip_version.h
|
||||
DESTINATION include/hip)
|
||||
install(FILES @PROJECT_BINARY_DIR@/.hipVersion DESTINATION bin)
|
||||
install(DIRECTORY @hip_SOURCE_DIR@/cmake DESTINATION .)
|
||||
|
||||
#############################
|
||||
# Packaging steps
|
||||
#############################
|
||||
set(CPACK_SET_DESTDIR TRUE)
|
||||
set(CPACK_INSTALL_PREFIX @CPACK_INSTALL_PREFIX@ )
|
||||
set(CPACK_PACKAGE_NAME "hip-base")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP Heterogenous-computing Interface for Portability [BASE]")
|
||||
set(CPACK_PACKAGE_DESCRIPTION "HIP:
|
||||
Heterogenous-computing Interface for Portability [BASE]")
|
||||
set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.")
|
||||
set(CPACK_PACKAGE_CONTACT "HIP Support <hip.support@amd.com>")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR @HIP_VERSION_MAJOR@)
|
||||
set(CPACK_PACKAGE_VERSION_MINOR @HIP_VERSION_MINOR@)
|
||||
set(CPACK_PACKAGE_VERSION_PATCH @HIP_PACKAGING_VERSION_PATCH@)
|
||||
set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_PACKAGING_VERSION_PATCH@)
|
||||
set(CPACK_GENERATOR "TGZ;DEB;RPM")
|
||||
|
||||
set(CPACK_BINARY_DEB "ON")
|
||||
set(CPACK_DEBIAN_PACKAGE_RELEASE @CPACK_DEBIAN_PACKAGE_RELEASE@)
|
||||
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${PROJECT_BINARY_DIR}/postinst;${PROJECT_BINARY_DIR}/prerm")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "perl (>= 5.0), liburi-encode-perl, libfile-basedir-perl, libfile-copy-recursive-perl, libfile-listing-perl, libfile-which-perl, libc6, file")
|
||||
set(CPACK_DEBIAN_PACKAGE_PROVIDES "hip-base")
|
||||
set(CPACK_DEBIAN_PACKAGE_REPLACES "hip_base")
|
||||
|
||||
set(CPACK_BINARY_RPM "ON")
|
||||
set(CPACK_RPM_PACKAGE_RELEASE @CPACK_RPM_PACKAGE_RELEASE@)
|
||||
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
|
||||
set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
|
||||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/postinst")
|
||||
set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/prerm")
|
||||
set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "perl >= 5.0, perl-File-Which, perl-File-Listing, perl-File-BaseDir, perl-URI-Encode, file")
|
||||
set(CPACK_RPM_PACKAGE_OBSOLETES "hip_base")
|
||||
set(CPACK_RPM_PACKAGE_CONFLICTS "hip_base")
|
||||
set(CPACK_BINARY_RPM "ON")
|
||||
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
include(CPack)
|
||||
@@ -1,73 +0,0 @@
|
||||
# Copyright (c) 2016-2021 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(hip_doc)
|
||||
|
||||
find_program(DOXYGEN_EXE doxygen)
|
||||
if(DOXYGEN_EXE)
|
||||
add_custom_target(build_doxygen ALL
|
||||
COMMAND HIP_PATH=@hip_SOURCE_DIR@ doxygen @hip_SOURCE_DIR@/docs/doxygen-input/doxy.cfg)
|
||||
install(DIRECTORY RuntimeAPI/html DESTINATION docs/docs/RuntimeAPI)
|
||||
endif()
|
||||
|
||||
#find_program(GRIP_EXE grip)
|
||||
#if(GRIP_EXE)
|
||||
# add_custom_target(convert_md_to_html ALL
|
||||
# COMMAND @hip_SOURCE_DIR@/packaging/convert_md_to_html.sh @hip_SOURCE_DIR@ ${PROJECT_BINARY_DIR}/md2html)
|
||||
# install(DIRECTORY md2html/ DESTINATION docs)
|
||||
#endif()
|
||||
|
||||
#############################
|
||||
# Packaging steps
|
||||
#############################
|
||||
set(CPACK_SET_DESTDIR TRUE)
|
||||
set(CPACK_INSTALL_PREFIX @CPACK_INSTALL_PREFIX@ )
|
||||
set(CPACK_PACKAGE_NAME "hip-doc")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP: Heterogenous-computing Interface for Portability [DOCUMENTATION]")
|
||||
set(CPACK_PACKAGE_DESCRIPTION "HIP:
|
||||
Heterogenous-computing Interface for Portability [DOCUMENTATION]")
|
||||
set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.")
|
||||
set(CPACK_PACKAGE_CONTACT "HIP Support <hip.support@amd.com>")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR @HIP_VERSION_MAJOR@)
|
||||
set(CPACK_PACKAGE_VERSION_MINOR @HIP_VERSION_MINOR@)
|
||||
set(CPACK_PACKAGE_VERSION_PATCH @HIP_PACKAGING_VERSION_PATCH@)
|
||||
set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_PACKAGING_VERSION_PATCH@)
|
||||
set(CPACK_GENERATOR "TGZ;DEB;RPM")
|
||||
|
||||
set(CPACK_BINARY_DEB "ON")
|
||||
set(CPACK_DEBIAN_PACKAGE_RELEASE @CPACK_DEBIAN_PACKAGE_RELEASE@)
|
||||
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "hip-base (= ${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE})")
|
||||
set(CPACK_DEBIAN_PACKAGE_PROVIDES "hip-doc")
|
||||
set(CPACK_DEBIAN_PACKAGE_REPLACES "hip_doc")
|
||||
|
||||
set(CPACK_BINARY_RPM "ON")
|
||||
set(CPACK_RPM_PACKAGE_RELEASE @CPACK_RPM_PACKAGE_RELEASE@)
|
||||
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
|
||||
set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
|
||||
set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
|
||||
string(REPLACE "-" "_" HIP_BASE_VERSION ${CPACK_PACKAGE_VERSION})
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "hip-base = ${HIP_BASE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}")
|
||||
set(CPACK_RPM_PACKAGE_OBSOLETES "hip_doc")
|
||||
set(CPACK_RPM_PACKAGE_CONFLICTS "hip_doc")
|
||||
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
include(CPack)
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
ROCMDIR=@ROCM_PATH@
|
||||
HIPDIR=$ROCMDIR/hip
|
||||
|
||||
if [ -d $ROCMDIR] ; then
|
||||
ln -s -f $ROCMDIR /opt/rocm
|
||||
fi
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
if [ -L "/opt/rocm" ] ; then
|
||||
unlink /opt/rocm
|
||||
fi
|
||||
@@ -1,62 +0,0 @@
|
||||
# Copyright (c) 2016-2021 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(hip_nvcc)
|
||||
|
||||
#############################
|
||||
# Packaging steps
|
||||
#############################
|
||||
set(CPACK_SET_DESTDIR TRUE)
|
||||
set(CPACK_INSTALL_PREFIX @CPACK_INSTALL_PREFIX@ )
|
||||
set(CPACK_PACKAGE_NAME "hip-nvcc")
|
||||
set(CPACK_PACKAGE_DESCRIPTION "HIP:
|
||||
Heterogenous-computing Interface for Portability [NVCC]")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP: Heterogenous-computing Interface for Portability [NVCC]")
|
||||
set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.")
|
||||
set(CPACK_PACKAGE_CONTACT "HIP Support <hip.support@amd.com>")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR @HIP_VERSION_MAJOR@)
|
||||
set(CPACK_PACKAGE_VERSION_MINOR @HIP_VERSION_MINOR@)
|
||||
set(CPACK_PACKAGE_VERSION_PATCH @HIP_VERSION_PATCH@)
|
||||
set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_PACKAGING_VERSION_PATCH@)
|
||||
set(CPACK_GENERATOR "TGZ;DEB;RPM")
|
||||
|
||||
set(CPACK_BINARY_DEB "ON")
|
||||
set(CPACK_DEBIAN_PACKAGE_RELEASE @CPACK_DEBIAN_PACKAGE_RELEASE@)
|
||||
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${PROJECT_BINARY_DIR}/postinst;${PROJECT_BINARY_DIR}/prerm")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "hip-base (= ${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}), cuda (>= 7.5)")
|
||||
set(CPACK_DEBIAN_PACKAGE_PROVIDES "hip-nvcc")
|
||||
set(CPACK_DEBIAN_PACKAGE_REPLACES "hip_nvcc")
|
||||
|
||||
set(CPACK_BINARY_RPM "ON")
|
||||
set(CPACK_RPM_PACKAGE_RELEASE @CPACK_RPM_PACKAGE_RELEASE@)
|
||||
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
|
||||
set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
|
||||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/postinst")
|
||||
set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/prerm")
|
||||
set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
|
||||
string(REPLACE "-" "_" HIP_BASE_VERSION ${CPACK_PACKAGE_VERSION})
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "hip-base = ${HIP_BASE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}, cuda >= 7.5")
|
||||
set(CPACK_RPM_PACKAGE_OBSOLETES "hip_nvcc")
|
||||
set(CPACK_RPM_PACKAGE_CONFLICTS "hip_nvcc")
|
||||
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
include(CPack)
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
ROCMDIR=@ROCM_PATH@
|
||||
ROCMLIBDIR=$ROCMDIR/lib
|
||||
ROCCLRDIR=$ROCMDIR/rocclr
|
||||
ROCCLRLIBDIR=$ROCMDIR/rocclr/lib
|
||||
HIPDIR=$ROCMDIR/hip
|
||||
HIPLIBDIR=$ROCMDIR/hip/lib
|
||||
CURRENTDIR=`pwd`
|
||||
# Soft-link to library files
|
||||
ROCCLRLIBFILES=$(ls -A $ROCCLRLIBDIR | grep -v "cmake\|[-/$]")
|
||||
HIPLIBFILES=$(ls -A $HIPLIBDIR | grep -v "cmake\|[-/$]")
|
||||
|
||||
mkdir -p $ROCMLIBDIR
|
||||
mkdir -p $ROCMLIBDIR/cmake
|
||||
|
||||
cd $ROCMLIBDIR
|
||||
for f in $ROCCLRLIBFILES
|
||||
do
|
||||
ln -s -r -f $ROCCLRLIBDIR/$f $(basename $f)
|
||||
done
|
||||
|
||||
for f in $HIPLIBFILES
|
||||
do
|
||||
ln -s -r -f $HIPLIBDIR/$f $(basename $f)
|
||||
done
|
||||
cd $CURRENTDIR
|
||||
|
||||
# Make the hip cmake directory link.
|
||||
cd $ROCMLIBDIR/cmake
|
||||
ln -s -r -f $ROCCLRLIBDIR/cmake/rocclr rocclr
|
||||
ln -s -r -f $HIPLIBDIR/cmake/hip hip
|
||||
ln -s -r -f $HIPLIBDIR/cmake/hip-lang hip-lang
|
||||
cd $CURRENTDIR
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2021 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
ROCMDIR=@ROCM_PATH@
|
||||
ROCMLIBDIR=$ROCMDIR/lib
|
||||
ROCCLRDIR=$ROCMDIR/rocclr
|
||||
ROCCLRLIBDIR=$ROCMDIR/rocclr/lib
|
||||
HIPDIR=$ROCMDIR/hip
|
||||
HIPLIBDIR=$ROCMDIR/hip/lib
|
||||
([ ! -d $ROCMDIR ] || [ ! -d $ROCCLRDIR ] || [ ! -d $HIPDIR ]) && exit 0
|
||||
([ ! -d $ROCMLIBDIR ] || [ ! -d $ROCCLRLIBDIR ] || [ ! -d $HIPLIBDIR ]) && exit 0
|
||||
CURRENTDIR=`pwd`
|
||||
# Remove soft-links to libraries
|
||||
ROCCLRLIBFILES=$(ls -A $ROCCLRLIBDIR | grep -v [-/$])
|
||||
HIPLIBFILES=$(ls -A $HIPLIBDIR | grep -v [-/$])
|
||||
|
||||
cd $ROCMLIBDIR
|
||||
for f in $ROCCLRLIBFILES; do
|
||||
[ -e $f ] || continue
|
||||
rm $(basename $f)
|
||||
done
|
||||
|
||||
for f in $HIPLIBFILES; do
|
||||
[ -e $f ] || continue
|
||||
rm $(basename $f)
|
||||
done
|
||||
cd $CURRENTDIR
|
||||
|
||||
cd $ROCMLIBDIR/cmake
|
||||
unlink rocclr
|
||||
unlink hip
|
||||
unlink hip-lang
|
||||
cd $CURRENTDIR
|
||||
|
||||
cd $ROCMLIBDIR
|
||||
rmdir --ignore-fail-on-non-empty cmake
|
||||
cd $CURRENTDIR
|
||||
rmdir --ignore-fail-on-non-empty $ROCMLIBDIR
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(hip_rocclr)
|
||||
|
||||
if(@BUILD_SHARED_LIBS@)
|
||||
install(FILES @PROJECT_BINARY_DIR@/lib/libamdhip64.so DESTINATION lib)
|
||||
install(FILES @PROJECT_BINARY_DIR@/lib/libamdhip64.so.@HIP_LIB_VERSION_MAJOR@ DESTINATION lib)
|
||||
install(FILES @PROJECT_BINARY_DIR@/lib/libamdhip64.so.@HIP_LIB_VERSION_STRING@ DESTINATION lib)
|
||||
else()
|
||||
install(FILES @PROJECT_BINARY_DIR@/lib/libamdhip64.a DESTINATION lib)
|
||||
endif()
|
||||
|
||||
install(FILES @PROJECT_BINARY_DIR@/.hipInfo DESTINATION lib)
|
||||
install(FILES @PROJECT_BINARY_DIR@/hip-config.cmake @PROJECT_BINARY_DIR@/hip-config-version.cmake DESTINATION lib/cmake/hip)
|
||||
install(FILES @PROJECT_BINARY_DIR@/src/hipamd/hip-lang-config.cmake @PROJECT_BINARY_DIR@/src/hipamd/hip-lang-config-version.cmake DESTINATION lib/cmake/hip-lang)
|
||||
|
||||
if(@__HIP_ENABLE_RTC@)
|
||||
install(FILES @PROJECT_BINARY_DIR@/lib/libhiprtc-builtins.so.@HIP_LIB_VERSION_MAJOR@.@HIP_LIB_VERSION_MINOR@ DESTINATION lib)
|
||||
endif()
|
||||
|
||||
#############################
|
||||
# Packaging steps
|
||||
#############################
|
||||
set(CPACK_SET_DESTDIR TRUE)
|
||||
set(CPACK_INSTALL_PREFIX @CPACK_INSTALL_PREFIX@)
|
||||
|
||||
## cmake generated target files contains IMPORTED_LOCATION_RELEASE etc. which
|
||||
## is installation path when building the project, which may be different from
|
||||
## the intallation path for packaging. These paths have to be replaced by
|
||||
## the package installation path, otherwise apps using pkg-config will fail.
|
||||
file(GLOB _target_files @CONFIG_PACKAGE_INSTALL_DIR@/hip-targets*.cmake)
|
||||
foreach(_target_file ${_target_files})
|
||||
execute_process(COMMAND sed -i s:@CMAKE_INSTALL_PREFIX@:${CPACK_INSTALL_PREFIX}:g ${_target_file})
|
||||
endforeach()
|
||||
install(FILES ${_target_files} DESTINATION lib/cmake/hip)
|
||||
|
||||
file(GLOB _target_files @CONFIG_LANG_PACKAGE_INSTALL_DIR@/hip-lang-targets*.cmake)
|
||||
foreach(_target_file ${_target_files})
|
||||
execute_process(COMMAND sed -i s:@CMAKE_INSTALL_PREFIX@:${CPACK_INSTALL_PREFIX}:g ${_target_file})
|
||||
endforeach()
|
||||
install(FILES ${_target_files} DESTINATION lib/cmake/hip-lang)
|
||||
|
||||
set(CPACK_PACKAGE_NAME "hip-rocclr")
|
||||
set(HCC_PACKAGE_NAME "rocclr")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP: Heterogenous-computing Interface for Portability [ROCClr]")
|
||||
set(CPACK_PACKAGE_DESCRIPTION "HIP:
|
||||
Heterogenous-computing Interface for Portability [ROCClr]")
|
||||
set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.")
|
||||
set(CPACK_PACKAGE_CONTACT "HIP Support <hip.support@amd.com>")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR @HIP_VERSION_MAJOR@)
|
||||
set(CPACK_PACKAGE_VERSION_MINOR @HIP_VERSION_MINOR@)
|
||||
set(CPACK_PACKAGE_VERSION_PATCH @HIP_VERSION_PATCH@)
|
||||
set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_PACKAGING_VERSION_PATCH@)
|
||||
set(CPACK_GENERATOR "TGZ;DEB;RPM")
|
||||
|
||||
set(CPACK_BINARY_DEB "ON")
|
||||
set(CPACK_DEBIAN_PACKAGE_RELEASE @CPACK_DEBIAN_PACKAGE_RELEASE@)
|
||||
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${PROJECT_BINARY_DIR}/postinst;${PROJECT_BINARY_DIR}/prerm")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "hsa-rocr-dev (>= 1.3), rocminfo, hip-base (= ${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}), comgr (>= 2.0), llvm-amdgpu, libc6")
|
||||
set(CPACK_DEBIAN_PACKAGE_PROVIDES "hip-hcc (= ${CPACK_PACKAGE_VERSION})")
|
||||
|
||||
set(CPACK_BINARY_RPM "ON")
|
||||
set(CPACK_RPM_PACKAGE_RELEASE @CPACK_RPM_PACKAGE_RELEASE@)
|
||||
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
|
||||
set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
|
||||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/postinst")
|
||||
set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/prerm")
|
||||
set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
|
||||
string(REPLACE "-" "_" HIP_BASE_VERSION ${CPACK_PACKAGE_VERSION})
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "hsa-rocr-dev >= 1.3, rocminfo, hip-base = ${HIP_BASE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}, comgr >= 2.0, llvm-amdgpu")
|
||||
set(CPACK_RPM_PACKAGE_PROVIDES "hip-hcc = ${HIP_BASE_VERSION}")
|
||||
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
include(CPack)
|
||||
@@ -1,61 +0,0 @@
|
||||
# Copyright (c) 2016-2021 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(hip_samples)
|
||||
|
||||
install(DIRECTORY @hip_SOURCE_DIR@/samples DESTINATION .)
|
||||
|
||||
#############################
|
||||
# Packaging steps
|
||||
#############################
|
||||
set(CPACK_SET_DESTDIR TRUE)
|
||||
set(CPACK_INSTALL_PREFIX @CPACK_INSTALL_PREFIX@ )
|
||||
set(CPACK_PACKAGE_NAME "hip-samples")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP: Heterogenous-computing Interface for Portability [SAMPLES]")
|
||||
set(CPACK_PACKAGE_DESCRIPTION "HIP:
|
||||
Heterogenous-computing Interface for Portability [SAMPLES]")
|
||||
set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.")
|
||||
set(CPACK_PACKAGE_CONTACT "HIP Support <hip.support@amd.com>")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR @HIP_VERSION_MAJOR@)
|
||||
set(CPACK_PACKAGE_VERSION_MINOR @HIP_VERSION_MINOR@)
|
||||
set(CPACK_PACKAGE_VERSION_PATCH @HIP_VERSION_PATCH@)
|
||||
set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_PACKAGING_VERSION_PATCH@)
|
||||
set(CPACK_GENERATOR "TGZ;DEB;RPM")
|
||||
|
||||
set(CPACK_BINARY_DEB "ON")
|
||||
set(CPACK_DEBIAN_PACKAGE_RELEASE @CPACK_DEBIAN_PACKAGE_RELEASE@)
|
||||
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "hip-base (= ${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE})")
|
||||
set(CPACK_DEBIAN_PACKAGE_PROVIDES "hip-samples")
|
||||
set(CPACK_DEBIAN_PACKAGE_REPLACES "hip_samples")
|
||||
|
||||
set(CPACK_BINARY_RPM "ON")
|
||||
set(CPACK_RPM_PACKAGE_RELEASE @CPACK_RPM_PACKAGE_RELEASE@)
|
||||
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
|
||||
set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
|
||||
set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
|
||||
string(REPLACE "-" "_" HIP_BASE_VERSION ${CPACK_PACKAGE_VERSION})
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "hip-base = ${HIP_BASE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}")
|
||||
set(CPACK_RPM_PACKAGE_OBSOLETES "hip_samples")
|
||||
set(CPACK_RPM_PACKAGE_CONFLICTS "hip_samples")
|
||||
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
include(CPack)
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir