Skip to content

scripts/build_locally.py now supports --cmake-opts option #917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions scripts/build_locally.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def run(
compiler_root=None,
cmake_executable=None,
use_glog=False,
cmake_opts="",
):
build_system = None

Expand Down Expand Up @@ -57,6 +58,8 @@ def run(
"-DDPCTL_ENABLE_L0_PROGRAM_CREATION=" + ("ON" if level_zero else "OFF"),
"-DDPCTL_ENABLE_GLOG:BOOL=" + ("ON" if use_glog else "OFF"),
]
if cmake_opts:
cmake_args += cmake_opts.split()
subprocess.check_call(
cmake_args, shell=False, cwd=setup_dir, env=os.environ
)
Expand Down Expand Up @@ -110,6 +113,13 @@ def run(
dest="glog",
action="store_true",
)
driver.add_argument(
"--cmake-opts",
help="DPCTLSyclInterface uses Google logger",
dest="cmake_opts",
default="",
type=str,
)
args = parser.parse_args()

args_to_validate = [
Expand Down Expand Up @@ -163,4 +173,5 @@ def run(
compiler_root=args.compiler_root,
cmake_executable=args.cmake_executable,
use_glog=args.glog,
cmake_opts=args.cmake_opts,
)