Add an option to build against no SDKs (#1201)

This commit is contained in:
Asher Baker 2020-03-04 21:52:07 +00:00 committed by GitHub
parent 6a307bfcee
commit bff8585411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -143,6 +143,7 @@ class SMConfig(object):
def detectSDKs(self): def detectSDKs(self):
sdk_list = builder.options.sdks.split(',') sdk_list = builder.options.sdks.split(',')
use_none = sdk_list[0] == 'none'
use_all = sdk_list[0] == 'all' use_all = sdk_list[0] == 'all'
use_present = sdk_list[0] == 'present' use_present = sdk_list[0] == 'present'
@ -161,7 +162,7 @@ class SMConfig(object):
sdk.path = Normalize(sdk_path) sdk.path = Normalize(sdk_path)
self.sdks[sdk_name] = sdk self.sdks[sdk_name] = sdk
if len(self.sdks) < 1 and len(sdk_list): if len(self.sdks) < 1 and len(sdk_list) and not use_none:
raise Exception('No SDKs were found that build on {0}-{1}, nothing to do.'.format( raise Exception('No SDKs were found that build on {0}-{1}, nothing to do.'.format(
builder.target.platform, builder.target.arch)) builder.target.platform, builder.target.arch))

View File

@ -33,8 +33,8 @@ parser.options.add_option('--enable-optimize', action='store_const', const='1',
parser.options.add_option('--no-mysql', action='store_false', default=True, dest='hasMySql', parser.options.add_option('--no-mysql', action='store_false', default=True, dest='hasMySql',
help='Disable building MySQL extension') help='Disable building MySQL extension')
parser.options.add_option('-s', '--sdks', default='all', dest='sdks', parser.options.add_option('-s', '--sdks', default='all', dest='sdks',
help='Build against specified SDKs; valid args are "all", "present", or ' help='Build against specified SDKs; valid args are "none", "all", "present",'
'comma-delimited list of engine names (default: %default)') ' or comma-delimited list of engine names (default: %default)')
parser.options.add_option('--breakpad-dump', action='store_true', dest='breakpad_dump', parser.options.add_option('--breakpad-dump', action='store_true', dest='breakpad_dump',
default=False, help='Dump and upload breakpad symbols') default=False, help='Dump and upload breakpad symbols')
parser.options.add_option('--disable-auto-versioning', action='store_true', dest='disable_auto_versioning', parser.options.add_option('--disable-auto-versioning', action='store_true', dest='disable_auto_versioning',