From 22a99e39d809308720ed794b9f6a209313be8b11 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Thu, 22 Dec 2022 17:11:56 +0100 Subject: [PATCH] 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. :^) --- Meta/Lagom/Tools/ConfigureComponents/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Meta/Lagom/Tools/ConfigureComponents/main.cpp b/Meta/Lagom/Tools/ConfigureComponents/main.cpp index 159f5f898d..192717cddc 100644 --- a/Meta/Lagom/Tools/ConfigureComponents/main.cpp +++ b/Meta/Lagom/Tools/ConfigureComponents/main.cpp @@ -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; }