Skip to content

Commit

Permalink
fixed relatives paths in auto-install.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bnicolae committed Jul 3, 2018
1 parent e16bc3c commit d14f670
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions auto-install.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ def install_dep(git_link, dep_vers):
try:
os.system("git clone {0} {1}".format(git_link, args.temp + '/' + name))
os.system("cd {0} && git fetch && git checkout {1}".format(args.temp + '/' + name, dep_vers))
os.system("cd {0} && cmake -DCMAKE_PREFIX_PATH={1}\
-DCMAKE_INSTALL_PREFIX={1} -DCMAKE_BUILD_TYPE={2} {3} && make install".format(args.temp + '/' + name,
args.prefix, cmake_build_type, compiler_options))
os.system("cd {0} && cmake -DCMAKE_INSTALL_PREFIX={1} -DCMAKE_BUILD_TYPE={2} {3}\
&& make install".format(args.temp + '/' + name,
args.prefix, cmake_build_type, compiler_options))
except Exception as err:
print("Error installing dependency {0}: {1}!".format(git_link, err))
sys.exit(4)
Expand All @@ -37,6 +37,7 @@ def install_dep(git_link, dep_vers):
parser.add_argument('--temp', default='/tmp/veloc',
help='temporary directory used during the install (default: /tmp/veloc)')
args = parser.parse_args()
args.prefix = os.path.abspath(args.prefix)
if not os.path.isdir(args.prefix):
print("Installation prefix {0} is not a valid directory!".format(args.prefix))
sys.exit(1)
Expand Down Expand Up @@ -81,8 +82,8 @@ def install_dep(git_link, dep_vers):
install_dep('https://github.com/ECP-VeloC/er.git', 'v0.0.3')

# VeloC
os.system("cmake -DCMAKE_PREFIX_PATH={0}\
-DCMAKE_INSTALL_PREFIX={0} -DCMAKE_BUILD_TYPE={1} {2} && make install".format(args.prefix, cmake_build_type, compiler_options))
os.system("cmake -DCMAKE_INSTALL_PREFIX={0} -DCMAKE_BUILD_TYPE={1} {2}\
&& make install".format(args.prefix, cmake_build_type, compiler_options))

# Cleanup
if (not args.debug):
Expand Down

0 comments on commit d14f670

Please sign in to comment.