Skip to content

Commit 51b450c

Browse files
authored
[SYCL] Fix build in clean environment (#4782)
Fix issues discovered in #4773
1 parent 074944e commit 51b450c

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

devops/containers/ubuntu2004_base.Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@ FROM ubuntu:20.04
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5+
USER root
6+
57
RUN apt update && apt install -yqq \
68
build-essential \
79
cmake \
810
ninja-build \
911
ccache \
1012
git \
11-
python3
13+
python3 \
14+
python3-distutils \
15+
python-is-python3
16+
17+
RUN adduser --disabled-password --gecos '' sycl
18+
19+
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
20+
21+
ENTRYPOINT ["/docker_entrypoint.sh"]

devops/scripts/docker_entrypoint.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
if [ -d "$GITHUB_WORKSPACE" ]; then
4+
chown -R sycl:sycl $GITHUB_WORKSPACE
5+
su sycl
6+
fi
7+
8+
exec "$@"

xptifw/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ option(XPTI_ENABLE_TBB "Enable TBB in the framework" OFF)
1515

1616
option(XPTI_ENABLE_WERROR OFF)
1717

18+
option(XPTI_BUILD_SAMPLES OFF)
19+
1820
if (XPTI_ENABLE_WERROR)
1921
if(MSVC)
2022
set(CMAKE_CXX_FLAGS "/WX ${CMAKE_CXX_FLAGS}")
@@ -53,8 +55,10 @@ add_subdirectory(src)
5355
add_custom_target(check-xptifw)
5456

5557
add_subdirectory(unit_test)
56-
add_subdirectory(samples/basic_collector)
57-
add_subdirectory(samples/syclpi_collector)
58+
if (XPTI_BUILD_SAMPLES)
59+
add_subdirectory(samples/basic_collector)
60+
add_subdirectory(samples/syclpi_collector)
61+
endif()
5862

5963
# The tests in basic_test are written using TBB, so these tests are enabled
6064
# only if TBB has been enabled.

0 commit comments

Comments
 (0)