Use Ninja Multi-Config generator by default on Linux.
This commit is contained in:
parent
54eeac20a9
commit
2034686f01
1 changed files with 12 additions and 5 deletions
|
|
@ -12,12 +12,15 @@ def run(project, arguments, buildType=''):
|
||||||
|
|
||||||
cmake = ['cmake']
|
cmake = ['cmake']
|
||||||
windowsArch = ''
|
windowsArch = ''
|
||||||
|
explicitGenerator = False
|
||||||
for arg in arguments:
|
for arg in arguments:
|
||||||
if arg == 'debug':
|
if arg == 'debug':
|
||||||
cmake.append('-DCMAKE_BUILD_TYPE=Debug')
|
cmake.append('-DCMAKE_BUILD_TYPE=Debug')
|
||||||
elif arg == 'x86' or arg == 'x64':
|
elif arg == 'x86' or arg == 'x64':
|
||||||
windowsArch = arg
|
windowsArch = arg
|
||||||
elif arg != 'force':
|
elif arg != 'force':
|
||||||
|
if arg.startswith('-G'):
|
||||||
|
explicitGenerator = True
|
||||||
cmake.append(arg)
|
cmake.append(arg)
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
if windowsArch == 'x64':
|
if windowsArch == 'x64':
|
||||||
|
|
@ -28,7 +31,11 @@ def run(project, arguments, buildType=''):
|
||||||
print("[ERROR] x86/x64 switch is supported only on Windows.")
|
print("[ERROR] x86/x64 switch is supported only on Windows.")
|
||||||
return 1
|
return 1
|
||||||
elif sys.platform == 'darwin':
|
elif sys.platform == 'darwin':
|
||||||
|
if not explicitGenerator:
|
||||||
cmake.append('-GXcode')
|
cmake.append('-GXcode')
|
||||||
|
else:
|
||||||
|
if not explicitGenerator:
|
||||||
|
cmake.append('-GNinja Multi-Config')
|
||||||
elif buildType:
|
elif buildType:
|
||||||
cmake.append('-DCMAKE_BUILD_TYPE=' + buildType)
|
cmake.append('-DCMAKE_BUILD_TYPE=' + buildType)
|
||||||
elif not '-DCMAKE_BUILD_TYPE=Debug' in cmake:
|
elif not '-DCMAKE_BUILD_TYPE=Debug' in cmake:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue