Skip to content

Commit 4a341e1

Browse files
authored
[BuildBot] Add --cmake-opts option to configure.py script (#1430)
Useful option to pass additional CMake parameters w/o changing configure.py script sources. Added a couple of ideas on how configure.py script can simplify usage. Fixed path to the compile.py script in GetStartedGuide. Signed-off-by: Alexey Bader <[email protected]>
1 parent de85c35 commit 4a341e1

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

buildbot/configure.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
import sys
55
import platform
66

7+
# TODO:
8+
# 1. Add support for relative paths (e.g. relative path to source directory)
9+
# 2. Create obj_dir from the script if it doesn't exist
10+
711
def do_configure(args):
812
ret = False
913

@@ -68,6 +72,7 @@ def do_configure(args):
6872
"-DLLVM_ENABLE_SPHINX={}".format(llvm_enable_sphinx),
6973
"-DBUILD_SHARED_LIBS={}".format(llvm_build_shared_libs),
7074
"-DSYCL_ENABLE_XPTI_TRACING=ON", # Explicitly turn on XPTI tracing
75+
"{}".format(args.cmake_opts),
7176
llvm_dir
7277
]
7378

@@ -91,7 +96,7 @@ def do_configure(args):
9196

9297
def main():
9398
parser = argparse.ArgumentParser(prog="configure.py",
94-
description="script to do configure",
99+
description="Generate build files from CMake configuration files",
95100
formatter_class=argparse.RawTextHelpFormatter)
96101
parser.add_argument("-n", "--build-number", metavar="BUILD_NUM", help="build number")
97102
parser.add_argument("-b", "--branch", metavar="BRANCH", help="pull request branch")
@@ -108,6 +113,7 @@ def main():
108113
parser.add_argument("--docs", action='store_true', help="build Doxygen documentation")
109114
parser.add_argument("--no-ocl", action='store_true', help="download OpenCL deps via CMake")
110115
parser.add_argument("--shared-libs", action='store_true', help="Build shared libraries")
116+
parser.add_argument("--cmake-opts", metavar="CMAKE_OPTS", help="Additional CMake options not configured via script parameters")
111117

112118
args = parser.parse_args()
113119

sycl/doc/GetStartedGuide.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ cd %DPCPP_HOME%\build
6868

6969
## Build DPC++ toolchain
7070

71-
The easiest way to get started is to use the buildbot [configure](../../buildbot/configure.py)
72-
and [compile](../../buildbot/configure.py) scripts.
71+
The easiest way to get started is to use the buildbot
72+
[configure](../../buildbot/configure.py) and
73+
[compile](../../buildbot/compile.py) scripts.
7374

74-
In case you want to configure CMake manually the up-to-date reference for variables is in these files.
75+
In case you want to configure CMake manually the up-to-date reference for
76+
variables is in these files.
7577

7678
**Linux**
7779

@@ -96,7 +98,6 @@ You can use the following flags with `configure.py`:
9698
* `--shared-libs` -> Build shared libraries
9799
* `-t` -> Build type (debug or release)
98100

99-
100101
Ahead-of-time compilation for the Intel&reg; processors is enabled by default.
101102
For more, see [opencl-aot documentation](../../opencl-aot/README.md).
102103

0 commit comments

Comments
 (0)