Skip to content

Commit 789850a

Browse files
Updating System2
1 parent af43477 commit 789850a

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

External/System2

Src/runcpp2/CompilingLinking.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ namespace
173173
//Compile the script
174174
ssLOG_INFO("running compile command: " << compileCommand);
175175

176-
System2CommandInfo compileCommandInfo;
176+
System2CommandInfo compileCommandInfo = {};
177+
compileCommandInfo.RedirectOutput = true;
177178
SYSTEM2_RESULT result = System2Run(compileCommand.c_str(), &compileCommandInfo);
178179

179180
if(result != SYSTEM2_RESULT_SUCCESS)
@@ -194,7 +195,7 @@ namespace
194195
4096 - 1,
195196
&byteRead);
196197

197-
output.resize(output.size() - 4096+ byteRead + 1);
198+
output.resize(output.size() - 4096 + byteRead + 1);
198199
output.back() = '\0';
199200
}
200201
while(result == SYSTEM2_RESULT_READ_NOT_FINISHED);
@@ -442,7 +443,8 @@ namespace
442443
linkCommand = "cd " + runcpp2ScriptDir + " && " + linkCommand;
443444

444445
//Do Linking
445-
System2CommandInfo linkCommandInfo;
446+
System2CommandInfo linkCommandInfo = {};
447+
linkCommandInfo.RedirectOutput = true;
446448
SYSTEM2_RESULT result = System2Run(linkCommand.c_str(), &linkCommandInfo);
447449

448450
ssLOG_INFO("running link command: " << linkCommand);
@@ -516,7 +518,8 @@ namespace
516518
for(int i = 0; i < currentSetupSteps.size(); ++i)
517519
setupCommand += " && " + currentSetupSteps.at(i);
518520

519-
System2CommandInfo setupCommandInfo;
521+
System2CommandInfo setupCommandInfo = {};
522+
setupCommandInfo.RedirectOutput = true;
520523
ssLOG_INFO("running setup command: " << setupCommand);
521524
SYSTEM2_RESULT result = System2Run(setupCommand.c_str(), &setupCommandInfo);
522525

Src/runcpp2/DependenciesSetupHelper.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ namespace
111111
std::string gitCloneCommand = "cd " + processedRuncpp2ScriptDir;
112112
gitCloneCommand += " && git clone " + dependencies[i].Source.Value;
113113

114-
System2CommandInfo gitCommandInfo;
114+
System2CommandInfo gitCommandInfo = {};
115+
gitCommandInfo.RedirectOutput = true;
115116
SYSTEM2_RESULT result = System2Run(gitCloneCommand.c_str(), &gitCommandInfo);
116117

117118
if(result != SYSTEM2_RESULT_SUCCESS)
@@ -248,7 +249,8 @@ namespace
248249
std::string setupCommand = "cd " + processedDependencyPath;
249250
setupCommand += " && " + setupCommands[k];
250251

251-
System2CommandInfo setupCommandInfo;
252+
System2CommandInfo setupCommandInfo = {};
253+
setupCommandInfo.RedirectOutput = true;
252254
SYSTEM2_RESULT result = System2Run(setupCommand.c_str(), &setupCommandInfo);
253255

254256
ssLOG_INFO("Running setup command: " << setupCommand);

Src/runcpp2/ProfileHelper.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ namespace
1212
//Check compiler
1313
std::string command = profile.Compiler.Executable + " -v";
1414

15-
System2CommandInfo compilerCommandInfo;
15+
System2CommandInfo compilerCommandInfo = {};
16+
compilerCommandInfo.RedirectOutput = true;
1617
SYSTEM2_RESULT sys2Result = System2Run(command.c_str(), &compilerCommandInfo);
1718

1819
if(sys2Result != SYSTEM2_RESULT_SUCCESS)
@@ -35,7 +36,8 @@ namespace
3536
//Check linker
3637
command = profile.Linker.Executable + " -v";
3738

38-
System2CommandInfo linkerCommandInfo;
39+
System2CommandInfo linkerCommandInfo = {};
40+
linkerCommandInfo.RedirectOutput = true;
3941
sys2Result = System2Run(command.c_str(), &linkerCommandInfo);
4042

4143
if(sys2Result != SYSTEM2_RESULT_SUCCESS)
@@ -161,4 +163,4 @@ int runcpp2::GetPreferredProfileIndex( const std::string& scriptPath,
161163
}
162164

163165
return firstAvailableProfileIndex;
164-
}
166+
}

Src/runcpp2/runcpp2.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ namespace
5656

5757
ssLOG_INFO("Running: " << runCommand);
5858

59-
System2CommandInfo runCommandInfo;
59+
System2CommandInfo runCommandInfo = {};
60+
runCommandInfo.RedirectOutput = true;
6061
SYSTEM2_RESULT result = System2Run(runCommand.c_str(), &runCommandInfo);
6162

6263
if(result != SYSTEM2_RESULT_SUCCESS)

0 commit comments

Comments
 (0)