@@ -54,6 +54,11 @@ static bool buildSwiftPackages(const std::vector<std::filesystem::path>& swiftPa
5454 return any_successful;
5555}
5656
57+ static void installDependencies (const CLIArgs& args) {
58+ auto structure = scanProjectStructure (args.workingDir );
59+ installDependencies (structure, args.dryRun );
60+ }
61+
5762static bool autobuild (const CLIArgs& args) {
5863 auto structure = scanProjectStructure (args.workingDir );
5964 auto & xcodeTargets = structure.xcodeTargets ;
@@ -82,7 +87,6 @@ static bool autobuild(const CLIArgs& args) {
8287 return false ;
8388 } else if (!xcodeTargets.empty ()) {
8489 LOG_INFO (" Building Xcode target: {}" , xcodeTargets.front ());
85- installDependencies (structure, args.dryRun );
8690 auto buildSucceeded = buildXcodeTarget (xcodeTargets.front (), args.dryRun );
8791 // If build failed, try to build Swift packages
8892 if (!buildSucceeded && !swiftPackages.empty ()) {
@@ -113,6 +117,7 @@ static CLIArgs parseCLIArgs(int argc, char** argv) {
113117
114118int main (int argc, char ** argv) {
115119 auto args = parseCLIArgs (argc, argv);
120+ installDependencies (args);
116121 auto success = autobuild (args);
117122 codeql::Log::flush ();
118123 if (!success) {
0 commit comments