From 8fdb908741be7b57f362a14e7fd32de7517bf1f6 Mon Sep 17 00:00:00 2001 From: risemeup1 <62429225+risemeup1@users.noreply.github.com> Date: Mon, 16 Jan 2023 17:33:18 +0800 Subject: [PATCH] optimize build_type (#49826) --- setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a11fa7d933..90be1f9bb2 100644 --- a/setup.py +++ b/setup.py @@ -679,7 +679,12 @@ def build_run(args, build_path, envrion_var): def run_cmake_build(build_path): - build_args = ["--build", ".", "--target", "install", "--config", 'Release'] + build_type = ( + os.getenv("CMAKE_BUILD_TYPE") + if os.getenv("CMAKE_BUILD_TYPE") is not None + else "release" + ) + build_args = ["--build", ".", "--target", "install", "--config", build_type] max_jobs = os.getenv("MAX_JOBS") if max_jobs is not None: max_jobs = max_jobs or str(multiprocessing.cpu_count()) -- GitLab