Skip to content

Commit

Permalink
make fedora.spec.into be el7 friendly
Browse files Browse the repository at this point in the history
add if() to detect build for el7 and then switch to use devtoolset.

Change-Id: I34d00ee59d73a9dec8e030091ff15b5fb858a548
Signed-off-by: Artur Harasimiuk <[email protected]>
  • Loading branch information
ArturHarasimiuk authored and Compute-Runtime-Automation committed Jul 6, 2018
1 parent aedbf48 commit b3c742b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ components:
branch: infra
clean_on_sync: true
dest_dir: infra
revision: a228519d4601f11ceef1f3cce1f013277be14388
revision: 9343fbf2e206466fc0485d7cd2952e0535c91be2
type: git
internal:
branch: master
Expand Down
14 changes: 14 additions & 0 deletions scripts/fedora.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ URL: https://github.com/intel/compute-runtime
Source0: https://github.com/intel/compute-runtime/archive/%{neo_commit_id}/neo.tar.gz
Source1: https://github.com/intel/gmmlib/archive/%{gmmlib_commit_id}/gmmlib.tar.gz

%if 0%{?el7}
BuildRequires: centos-release-scl epel-release
BuildRequires: devtoolset-4-gcc-c++ cmake3
BuildRequires: gcc-c++ ninja-build make procps python2 libva-devel
%else
BuildRequires: cmake clang gcc-c++ ninja-build make procps python2 sed libva-devel
%endif

BuildRequires: intel-igc-opencl-devel >= __IGC_VERSION_REQUIRED__
Requires: intel-igc-opencl >= __IGC_VERSION_REQUIRED__

Expand All @@ -32,8 +39,15 @@ tar xzf $RPM_SOURCE_DIR/gmmlib.tar.gz -C gmmlib --strip-components=1

mkdir build
cd build

%if 0%{?el7}
scl enable devtoolset-4 "cmake3 ../neo -DCMAKE_BUILD_TYPE=Release -DNEO_DRIVER_VERSION=%{version}"
scl enable devtoolset-4 "make -j`nproc` igdrcl_dll"
%else
cmake ../neo -DCMAKE_BUILD_TYPE=Release -DNEO_DRIVER_VERSION=%{version}
make -j`nproc` igdrcl_dll
%endif

echo "==== DONE ===="


Expand Down

0 comments on commit b3c742b

Please sign in to comment.