Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions ClangAstParser/src/pt/up/fe/specs/clang/SupportedPlatform.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public enum SupportedPlatform implements StringProvider {
.newLazyHelperWithValue(SupportedPlatform.class);


private static final double SUPPORTED_MAC_VERSION = 11.5;
private static final double SUPPORTED_LINUX_VERSION = 5;

public static EnumHelperWithValue<SupportedPlatform> getHelper() {
Expand All @@ -63,13 +62,6 @@ private static SupportedPlatform calculateCurrentPlatform() {

// Generic Mac
if (SpecsPlatforms.isMac()) {
var macosVersion = getMacOSVersion();

if (macosVersion != null && macosVersion < SUPPORTED_MAC_VERSION) {
ClavaLog.info("Current MacOS version is " + macosVersion + " but only " + SUPPORTED_MAC_VERSION
+ " and above are supported, execution might fail");
}

return MAC_OS;
}

Expand All @@ -82,7 +74,6 @@ private static SupportedPlatform calculateCurrentPlatform() {
var linuxMajorVersion = getLinuxMajorVersion();

if (linuxMajorVersion == null) {
ClavaLog.info("Could not determine Linux version, running at your own risk");
return LINUX_5;
}

Expand All @@ -106,8 +97,6 @@ private static Integer getLinuxMajorVersion() {
var dotIndex = linuxVersion.indexOf('.');

if (dotIndex == -1) {
ClavaLog.info("Could not extract major version from Linux OS version string, expected at least a . : '"
+ linuxVersion + "'");
return null;
}

Expand All @@ -116,31 +105,12 @@ private static Integer getLinuxMajorVersion() {
var majorVersion = SpecsStrings.parseInteger(majorVersionString);

if (majorVersion == null) {
ClavaLog.info("Could not extract major version from Linux OS version string, '" + majorVersionString
+ "' is not an integer: '" + linuxVersion + "'");
return null;
}

return majorVersion;
}

private static Double getMacOSVersion() {
var macosVersion = System.getProperty("os.version");

// Extract major.minor (e.g., "14.7" from "14.7.6")
var versionParts = macosVersion.split("\\.");
String majorMinor = versionParts.length >= 2 ? versionParts[0] + "." + versionParts[1] : macosVersion;

var versionNumber = SpecsStrings.parseDouble(majorMinor);

if (versionNumber == null) {
ClavaLog.info("Could not convert MacOS version to a double: '" + macosVersion + "'");
return null;
}

return versionNumber;
}

@Override
public String getString() {
return getName();
Expand Down