diff options
author | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2023-12-23 04:29:27 +0000 |
---|---|---|
committer | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2023-12-23 04:29:27 +0000 |
commit | 45a25d12ee679cbd48ab233afa5de3ac8c78b8a5 (patch) | |
tree | a5c560fea3284caeb268d1aededde5c6fa3c8ed1 | |
parent | e2e5232aa58c1fe417040c9537d6ed77ecce2401 (diff) |
-rw-r--r-- | hiprand.spec | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/hiprand.spec b/hiprand.spec index f49092e..7e57e2c 100644 --- a/hiprand.spec +++ b/hiprand.spec @@ -4,17 +4,16 @@ %global rocm_patch 0 %global rocm_version %{rocm_release}.%{rocm_patch} -# Compiler is hipcc, which is clang based: -%global toolchain clang +%global toolchain rocm # hipcc does not support some clang flags %global build_cxxflags %(echo %{optflags} | sed -e 's/-fstack-protector-strong/-Xarch_host -fstack-protector-strong/' -e 's/-fcf-protection/-Xarch_host -fcf-protection/') # Option to test suite for testing on real HW: -%bcond_with check +%bcond_with test Name: hiprand Version: %{rocm_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: HIP random number generator Url: https://github.com/ROCm/%{upstreamname} @@ -27,17 +26,19 @@ BuildRequires: compiler-rt BuildRequires: clang-devel BuildRequires: doxygen BuildRequires: glibc-headers -%if %{with check} -BuildRequires: gtest-devel -%endif BuildRequires: lld BuildRequires: llvm-devel BuildRequires: rocm-cmake BuildRequires: rocm-comgr-devel BuildRequires: rocm-hip-devel +BuildRequires: rocm-rpm-macros BuildRequires: rocm-runtime-devel BuildRequires: rocrand-devel +%if %{with test} +BuildRequires: gtest-devel +%endif + # Only x86_64 works right now: ExclusiveArch: x86_64 @@ -55,6 +56,15 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The hipRAND development package. +%if %{with test} +%package test +Summary: Tests for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description test +%{summary} +%endif + %prep %autosetup -p1 -n %{upstreamname}-rocm-%{version} @@ -64,35 +74,35 @@ sed -i '/INSTALL_RPATH/d' CMakeLists.txt %build %cmake \ -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \ -%if %{with check} +%if %{with test} -DBUILD_TEST=ON \ %endif -DCMAKE_INSTALL_LIBDIR=%{_lib} \ - -DCMAKE_CXX_COMPILER=hipcc \ -DROCM_SYMLINK_LIBS=OFF %cmake_build %install %cmake_install -%check -%if %{with check} -%ctest -%endif - %files %doc README.md %license %{_docdir}/%{name}/LICENSE.txt %{_libdir}/lib%{name}.so.1{,.*} -%if %{with check} -%{_bindir}/test_%{name}* -%endif %files devel %{_libdir}/lib%{name}.so %{_includedir}/%{name} %{_libdir}/cmake/%{name} +%if %{with test} +%files test +%{_bindir}/test_%{name}* +%endif + %changelog +* Fri Dec 22 2023 Jeremy Newton <alexjnewt at hotmail dot com> - 6.0.0-2 +- Add test package +- Use rocm toolchain instead of clang (requires rocm macros) + * Thu Dec 21 2023 Jeremy Newton <alexjnewt at hotmail dot com> - 6.0.0-1 - Initial package |