Skip to content

Commit

Permalink
Execute commands as shell
Browse files Browse the repository at this point in the history
  • Loading branch information
muit committed Jan 5, 2023
1 parent 2109c13 commit dcb73b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ def configure(root, path, build_path, config):

command = 'cmake -S "{}" -B "{}" -C "{}" -DCMAKE_BUILD_TYPE={}'.format(path, build_path, cache_file, config)
print('Command: {}'.format(command))
subprocess.run(command, check=True)
subprocess.run(command, shell=True, check=True)
print('\n')

def build(build_path, config):
print('>> Build ({})'.format(config))
command = 'cmake --build "{}" --config {} --target install'.format(build_path, config)
print('Command: {}'.format(command))
subprocess.run(command, check=False)
subprocess.run(command, shell=True, check=False)

# Extra targets
#command = 'cmake --build "{}" --config {} --target libclang'.format(build_path, config)
#print('Command: {}'.format(command))
#subprocess.run(command, check=False)
#subprocess.run(command, shell=True, check=False)
print('\n')

def install(install_path, build_path, config):
print(">> Install LLVM")
command = 'cmake --install {} --config {} --prefix {}'.format(build_path, config, install_path)
print('Command: {}'.format(command))
subprocess.run(command, check=True)
subprocess.run(command, shell=True, check=True)
print('\n')


Expand Down

0 comments on commit dcb73b8

Please sign in to comment.