Skip to content

Commit

Permalink
perf(script): update install script file, add REGISTER_INSTALL_PREFIX…
Browse files Browse the repository at this point in the history
… compile flag to gflag
  • Loading branch information
minhanghuang committed Dec 21, 2024
1 parent 0ee5c54 commit 661e328
Showing 1 changed file with 8 additions and 3 deletions.
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 661e328

Please sign in to comment.