Skip to content

Commit b196e73

Browse files
Merge pull request #835 from IntelPython/fix-local-debug-build
Fixed build_locally.py to allow building debug build
2 parents 94771c4 + 4a92dba commit b196e73

File tree

7 files changed

+15
-20
lines changed

7 files changed

+15
-20
lines changed

.github/workflows/conda-package.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,7 @@ jobs:
398398
conda activate --stack build_env
399399
if [ -e CMakeLists.txt ]
400400
then
401-
python setup.py build_ext --inplace -- -G Ninja \
402-
-DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx \
401+
CC=icx CXX=icpx python setup.py build_ext --inplace -G Ninja -- \
403402
-DTBB_LIBRARY_DIR=${TBBROOT}/lib \
404403
-DMKL_LIBRARY_DIR=${MKLROOT}/lib \
405404
-DMKL_INCLUDE_DIR=${MKLROOT}/include \

.github/workflows/generate-docs.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,12 @@ jobs:
6363
source /opt/intel/oneapi/setvars.sh
6464
wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-2.1.2/doxyrest-2.1.2-linux-amd64.tar.xz
6565
tar xf doxyrest-2.1.2-linux-amd64.tar.xz
66-
python setup.py develop -- \
67-
-G "Ninja" \
68-
-DCMAKE_BUILD_TYPE=Debug \
69-
-DCMAKE_C_COMPILER:PATH=icx \
70-
-DCMAKE_CXX_COMPILER:PATH=icpx \
71-
-DDPCTL_GENERATE_DOCS=ON \
72-
-DDPCTL_ENABLE_DOXYREST=ON \
66+
python setup.py develop -G Ninja --build-type=Debug \
67+
-- \
68+
-DCMAKE_C_COMPILER:PATH=$(which icx) \
69+
-DCMAKE_CXX_COMPILER:PATH=$(which icpx) \
70+
-DDPCTL_GENERATE_DOCS=ON \
71+
-DDPCTL_ENABLE_DOXYREST=ON \
7372
-DDoxyrest_DIR=`pwd`/doxyrest-2.1.2-linux-amd64
7473
python -c "import dpctl; print(dpctl.__version__)" || exit 1
7574
cd "$(find _skbuild -name cmake-build)" || exit 1

.github/workflows/os-llvm-sycl-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ jobs:
9797
export OCL_ICD_FILENAMES=libintelocl.so:libintelocl_emu.so
9898
clang++ --version
9999
sycl-ls
100-
python setup.py develop -- -G Ninja -DCMAKE_C_COMPILER:PATH=clang -DCMAKE_CXX_COMPILER:PATH=clang++
100+
CC=clang CXX=clang++ python setup.py develop -G Ninja
101101
python -c "import dpctl; dpctl.lsplatform()" || exit 1
102102
SYCL_ENABLE_HOST_DEVICE=1 python -m pytest -v dpctl/tests

conda-recipe/bld.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set "LIB=%BUILD_PREFIX%\Library\lib;%BUILD_PREFIX%\compiler\lib;%LIB%"
44
set "INCLUDE=%BUILD_PREFIX%\include;%INCLUDE%"
55

66
"%PYTHON%" setup.py clean --all
7-
set "SKBUILD_ARGS=-- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx"
7+
set "SKBUILD_ARGS=-G Ninja -- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx"
88
set "SYCL_INCLUDE_DIR_HINT=%BUILD_PREFIX%\Library\lib\clang\14.0.0"
99

1010
set "PLATFORM_DIR=%PREFIX%\Library\share\cmake-3.22\Modules\Platform"

scripts/build_locally.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ def run(
4949
"--cmake-executable=" + cmake_executable,
5050
]
5151
cmake_args += [
52+
"--build-type=" + build_type,
53+
"--generator=" + build_system,
5254
"--",
53-
"-G",
54-
build_system,
55-
"-DCMAKE_BUILD_TYPE=" + build_type,
5655
"-DCMAKE_C_COMPILER:PATH=" + c_compiler,
5756
"-DCMAKE_CXX_COMPILER:PATH=" + cxx_compiler,
5857
"-DDPCTL_ENABLE_L0_PROGRAM_CREATION=" + ("ON" if level_zero else "OFF"),

scripts/gen_coverage.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ def run(
4747
sys.executable,
4848
"setup.py",
4949
"develop",
50+
"--build-type=Debug",
51+
"--generator=Ninja",
5052
"--",
51-
"-G",
52-
"Ninja",
53-
"-DCMAKE_BUILD_TYPE=Debug",
5453
"-DCMAKE_C_COMPILER:PATH=" + c_compiler,
5554
"-DCMAKE_CXX_COMPILER:PATH=" + cxx_compiler,
5655
"-DDPCTL_ENABLE_L0_PROGRAM_CREATION=" + ("ON" if level_zero else "OFF"),

scripts/gen_docs.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ def run(
4646
sys.executable,
4747
"setup.py",
4848
"develop",
49+
"--build-type=Debug",
50+
"--generator=Ninja",
4951
"--",
50-
"-G",
51-
"Ninja",
52-
"-DCMAKE_BUILD_TYPE=Debug",
5352
"-DCMAKE_C_COMPILER:PATH=" + c_compiler,
5453
"-DCMAKE_CXX_COMPILER:PATH=" + cxx_compiler,
5554
"-DDPCTL_ENABLE_L0_PROGRAM_CREATION=" + ("ON" if level_zero else "OFF"),

0 commit comments

Comments
 (0)