From 661e32835993849253f695ebefd3363b8a0a054c Mon Sep 17 00:00:00 2001 From: minhanghuang Date: Sat, 21 Dec 2024 10:27:43 +0800 Subject: [PATCH 1/2] perf(script): update install script file, add REGISTER_INSTALL_PREFIX compile flag to gflag --- install.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/install.py b/install.py index 6f30169..f87676f 100644 --- a/install.py +++ b/install.py @@ -54,7 +54,10 @@ def _clone_github_repo(self, repo_url, repo_name, *args): for arg in args: command += " " + arg print("clone: {}".format(command)) - subprocess.run(command, shell=True) + result = subprocess.run(command, shell=True) + if result.returncode != 0: + print("clone failed: {}".format(repo_url)) + raise Exception("clone failed: {}".format(repo_url)) def _clone_setup(self): self._clone_github_repo( @@ -134,8 +137,10 @@ def _clone_gfamily(self): self._cmd("mkdir -p build") os.chdir("build") self._cmd( - "cmake -DCMAKE_CXX_FLAGS='-fPIC' -DCMAKE_INSTALL_PREFIX={} -DBUILD_SHARED_LIBS=ON ..".format( - self._install_prefix)) + "cmake -DCMAKE_CXX_FLAGS='-fPIC' -DREGISTER_INSTALL_PREFIX=OFF -DCMAKE_INSTALL_PREFIX={} -DBUILD_SHARED_LIBS=ON ..".format( + self._install_prefix + ) + ) self._cmd("make install -j$(nproc)") os.chdir(self._current_path) From 1f2be077ce4c42adb931e35f8dd447b90ac0f1f4 Mon Sep 17 00:00:00 2001 From: minhanghuang Date: Sat, 21 Dec 2024 10:28:11 +0800 Subject: [PATCH 2/2] docs: update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 10a47da..4536135 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,8 @@ cd CyberRT > install ```shell -sudo python3 install.py -# sudo python3 install.py --platform --install_prefix +python3 install.py +# python3 install.py --platform --install_prefix ``` > export path