Skip to content

Commit

Permalink
Merge pull request #82 from minhanghuang/script-v9
Browse files Browse the repository at this point in the history
Script v9
  • Loading branch information
minhanghuang authored Dec 21, 2024
2 parents 0ee5c54 + 1f2be07 commit a3227f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ cd CyberRT
> install
```shell
sudo python3 install.py
# sudo python3 install.py --platform <your-platform-machine> --install_prefix <your-install-path>
python3 install.py
# python3 install.py --platform <your-platform-machine> --install_prefix <your-install-path>
```

> export path
Expand Down
11 changes: 8 additions & 3 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit a3227f5

Please sign in to comment.