исправление бага с определением версии с++ на целевой машине тестирования DVM
This commit is contained in:
@@ -268,17 +268,30 @@ public class UserConnection {
|
||||
Pair<RemoteFile, RemoteFile> oe = performScript(scriptDirectory, command);
|
||||
RemoteFile outFile = oe.getKey();
|
||||
String out = readFromFile(outFile);
|
||||
//--
|
||||
RemoteFile cppVersionsInfo = new RemoteFile(scriptDirectory, "cpp_versions.txt");
|
||||
sftpChannel.rename(outFile.full_name, cppVersionsInfo.full_name);
|
||||
//--
|
||||
String[] data = out.split("\n");
|
||||
boolean cpp_17=false;
|
||||
boolean cpp_11=false;
|
||||
//определить какие есть версии.
|
||||
for (String version : data) {
|
||||
System.out.println(Utils.Brackets(version));
|
||||
if (version.equals("c++17")) {
|
||||
res = "-std=c++17";
|
||||
break;
|
||||
} else if (version.equals("c++11")) {
|
||||
res = "-std=c++11";
|
||||
break;
|
||||
switch (version){
|
||||
case "c++17":
|
||||
cpp_17=true;
|
||||
break;
|
||||
case "c++11":
|
||||
cpp_11=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cpp_17)
|
||||
res = "-std=c++17";
|
||||
else if (cpp_11)
|
||||
res= "-std=c++11";
|
||||
RemoteFile cppFlag = new RemoteFile(scriptDirectory, "current_ccp_version");
|
||||
writeToFile(res, cppFlag);
|
||||
return res;
|
||||
}
|
||||
public String compileModules(RemoteFile modulesDirectory) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user