forked from firka/flutter
Fix CMake invocation for 3.10 compat (#57415)
The -S/-B format of specifying source and build directories wasn't added until 3.13. For 3.10 compatibility, use the older form of having the working directory as the build directory, and the last argument as the source directory. Fixes #57409
This commit is contained in:
@@ -81,20 +81,20 @@ Future<void> buildLinux(
|
||||
Future<void> _runCmake(String buildModeName, Directory sourceDir, Directory buildDir) async {
|
||||
final Stopwatch sw = Stopwatch()..start();
|
||||
|
||||
await buildDir.create(recursive: true);
|
||||
|
||||
final String buildFlag = toTitleCase(buildModeName);
|
||||
int result;
|
||||
try {
|
||||
result = await processUtils.stream(
|
||||
<String>[
|
||||
'cmake',
|
||||
'-S',
|
||||
sourceDir.path,
|
||||
'-B',
|
||||
buildDir.path,
|
||||
'-G',
|
||||
'Ninja',
|
||||
'-DCMAKE_BUILD_TYPE=$buildFlag',
|
||||
sourceDir.path,
|
||||
],
|
||||
workingDirectory: buildDir.path,
|
||||
environment: <String, String>{
|
||||
'CC': 'clang',
|
||||
'CXX': 'clang++'
|
||||
|
||||
Reference in New Issue
Block a user