further refactor
This commit is contained in:
parent
e09b663c0e
commit
0f5feb9c36
@ -61,15 +61,12 @@ def test_adapt_cmake_command_to_platform():
|
|||||||
|
|
||||||
def adapt_cmake_command_to_platform(cmake_command, platform):
|
def adapt_cmake_command_to_platform(cmake_command, platform):
|
||||||
"""
|
"""
|
||||||
Adapts CMake command to MS Windows platform.
|
Adapt CMake command to MS Windows platform.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if platform == 'win32':
|
if platform == 'win32':
|
||||||
pos = cmake_command.find('cmake')
|
pos = cmake_command.find('cmake')
|
||||||
cmake_export_vars = cmake_command[:pos]
|
s = ['set %s &&' % e for e in cmake_command[:pos].split()]
|
||||||
rest = cmake_command[pos:]
|
s.append(cmake_command[pos:])
|
||||||
s = ['set %s &&' % e for e in cmake_export_vars.split()]
|
|
||||||
s.append(rest)
|
|
||||||
return ' '.join(s)
|
return ' '.join(s)
|
||||||
else:
|
else:
|
||||||
return cmake_command
|
return cmake_command
|
||||||
|
Loading…
x
Reference in New Issue
Block a user