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 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)