mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
Lagom/ConfigureComponents: Run cmake command last
Previously the tool was removing the Root directory after configuring cmake which was breaking the build, as some cmake rules put some necessary files there. Moving the cmake command to be the last one makes it regenerate those files automatically. :^)
This commit is contained in:
parent
64b1d4dc8b
commit
22a99e39d8
Notes:
sideshowbarker
2024-07-17 08:55:54 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/22a99e39d8 Pull-request: https://github.com/SerenityOS/serenity/pull/16628 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 5 additions and 5 deletions
|
@ -348,8 +348,8 @@ int main()
|
|||
cmake_arguments.append(DeprecatedString::formatted("-DBUILD_{}={}", component.name.to_uppercase(), component.is_selected ? "ON" : "OFF"));
|
||||
|
||||
warnln("\e[34mThe following command will be run:\e[0m");
|
||||
outln("{} \\", DeprecatedString::join(' ', cmake_arguments));
|
||||
outln(" && ninja clean\n && rm -rf Root");
|
||||
outln("ninja clean \\\n && rm -rf Root \\");
|
||||
outln(" && {}", DeprecatedString::join(' ', cmake_arguments));
|
||||
warn("\e[34mDo you want to run the command?\e[0m [Y/n] ");
|
||||
auto character = getchar();
|
||||
if (character == 'n' || character == 'N') {
|
||||
|
@ -357,13 +357,13 @@ int main()
|
|||
return 0;
|
||||
}
|
||||
|
||||
// Step 6: Run CMake, 'ninja clean' and 'rm -rf Root'
|
||||
// Step 6: Run 'ninja clean', 'rm -rf Root' and CMake
|
||||
auto command = DeprecatedString::join(' ', cmake_arguments);
|
||||
if (!run_system_command(command, "CMake"sv))
|
||||
return 1;
|
||||
if (!run_system_command("ninja clean"sv, "Ninja"sv))
|
||||
return 1;
|
||||
if (!run_system_command("rm -rf Root"sv, "rm"sv))
|
||||
return 1;
|
||||
if (!run_system_command(command, "CMake"sv))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue