Skip to content
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

Script v9 #82

Merged
merged 2 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
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
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
Loading