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

Stops the creation of _build and _logs directories if CMakeLists.txt is not found #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
13 changes: 9 additions & 4 deletions bin/polly.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,15 @@ def PositiveInt(string):
else:
cdir = os.getcwd()

home = '.'
if args.home:
home = args.home

# Check the existence of CMakeLists.txt and exit before creating any directories
cmakelists_path = '{}/CMakeLists.txt'.format(home)
if not os.path.exists(cmakelists_path):
sys.exit('Specified path for CMakeList does not exist: {}'.format(cmakelists_path))

build_dir = os.path.join(cdir, '_builds', build_tag)
print("Build dir: {}".format(build_dir))
build_dir_option = "-B{}".format(build_dir)
Expand Down Expand Up @@ -373,10 +382,6 @@ def PositiveInt(string):
detail.call.call(['which', cmake_bin], logging)
detail.call.call([cmake_bin, '--version'], logging)

home = '.'
if args.home:
home = args.home

generate_command = [
cmake_bin,
'-H{}'.format(home),
Expand Down