-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add support for vcpkg #26
base: master
Are you sure you want to change the base?
Conversation
…is not found This provides a better user experience for new users who run the tool outside of a CMake source tree, who would later have to clean up those directories.
@@ -403,9 +412,6 @@ def PositiveInt(string): | |||
toolset = 'v{}0_xp'.format(toolchain_entry.vs_version) | |||
generate_command.append('-T{}'.format(toolset)) | |||
|
|||
if toolchain_option: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition was removed because toolchain_option
(and transitively toolchain_path
) was always present.
@@ -380,9 +385,13 @@ def PositiveInt(string): | |||
generate_command = [ | |||
cmake_bin, | |||
'-H{}'.format(home), | |||
build_dir_option | |||
'-B{}'.format(build_dir), | |||
'-DCMAKE_TOOLCHAIN_FILE={}'.format(args.vcpkg if args.vcpkg else toolchain_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preferred
'-DCMAKE_TOOLCHAIN_FILE={}'.format(args.vcpkg if args.vcpkg else toolchain_path)
over
'-DCMAKE_TOOLCHAIN_FILE={}'.format(toolchain_path if not args.vcpkg else args.vcpkg)
to avoid negative logic.
@@ -309,7 +315,6 @@ def PositiveInt(string): | |||
|
|||
build_dir = os.path.join(cdir, '_builds', build_tag) | |||
print("Build dir: {}".format(build_dir)) | |||
build_dir_option = "-B{}".format(build_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed build_dir_option
to match the current style of generate_command
below.
Added the --vcpkg flag which enables vcpkg support and optionally allows to specify path to vcpkg.cmake
4eb2df1
to
e653160
Compare
Added the --vcpkg flag which enables vcpkg support and optionally allows to specify path to vcpkg.cmake